Você está na página 1de 60

Three Dimensional Concepts

3D Display methods
Parallel

projection Perspective projection Depth cueing Visible lines & Surface identification Exploded & Cutaway views 3 D & Stereoscopic views

3D Display methods

Parallel projection parallel lines in world coordinate scenes are projected as parallel lines in 2D display plane. Perspective projection parallel lines that are not parallel to the display plane are projected into converging lines. Depth Cueing method to indicate the depth with wire frame display. intensity of the objects are varied according to their distance from the viewing position

3D Display methods
y

Visible line & surface identification clarify depth relationships highlight visible lines in a different color non visible lines are displayed as dashed line Surface Rendering sets the surface intensity of objects according to the lighting conditions in the scene and according to assigned surface characteristics

3D Display methods

Exploded & cutaway views show the internal structure and relationships of object parts cut away view removes part of visible surfaces to show internal structure 3 D & Stereoscopic view obtained by reflecting a raster image from a vibrating flexible mirror stereoscopic view provides separarte views for left eye & right eye

3D Object Representations
Polygon & Quadric surfaces y Spline surfaces y Fractal constructions & particle systems y Octree encodings y Isosurface displays y Volume renderings y Other visualization techniques Categories of representation  Boundary representation  Space partitioning representation
y

3D Object Representations Polygon surfaces


Object descriptions are stored as sets of surface polygons - The surfaces are described with linear equations Polygon table data is placed into the polygon table for processing Polygon data table can be organised into two groups  geometric table  attribute table
-

Polygon surfaces
Storing geometric data To store geometric data three lists are created  Vertex table contains coordinate values for each vertex  Edge table contains pointers back into the vertex table  Polygon table contains pointers back into the edge table Advantages of three table efficient display of objects For faster info. Extraction expand edge table to include forward pointers to the polygon table

Polygon surfaces
To check data consistency & completeness Check that
every vertex is an endpoint for atleast two edges  Every edge is part of atleast one polygon  Every polygon is closed  Every polygon has atleast one shared edge  Every edge referenced by a polygon pointer has a reciprocal pointer back to the polygon


Polygon surfaces
Plane Equation

Ax + By + Cz + D = 0
eqn. is solved by Cramers rule
Identification of points if Ax + By + Cz + D < 0 ,the points (x,y,z) is inside the surface if Ax + By + Cz + D > 0 ,the points (x,y,z) is outside the surface

Quadric Surfaces
-

Described with second degree eqns. Ex. Sphere,ellipsoids,tori,paraboloids,hyperboloids


Sphere A spherical surface with radius r centered on the coordinate origin is defined as a set of points(x,y,z) that satisfy the equation x2 + y2 + z2 = r2 In parametric form,
x = r Cos Cos y = r Cos Sin z = r Sin

Ellipsoid
Extension of spherical surface ,where the radii in three mutually perpendicular directions have different values (x/rx)2 + (y/r y)2 + (z/rz)2 = 1 In parametric form,
x = rx Cos Cos y = ry Cos z = rz Sin Sin

Blobby objects
Dont maintain a fixed shape Change surface characteristics in certain motions Ex. Water droplet, Molecular structures

f(x,y,z) = r = x2 + y2 + z2

b ke-ak rk2 - T = 0

T =some threshold

a,b used to adjust the amount of bloobiness.

Spline representation
Spline Curve
it is a composite curve formed with polynomial pieces satisfying a specified continuity conditions at the boundary of the pieces

Control points

it is a set of point that indicate the general shape of the curve After fitting the polynomial sections if the curve passes through all the control points the curve is said to interpolate the set of points If the polynomial are fitted to the general control point path without necessarily passing through any control point the curve is said to approximate the set of points The convex polygon boundary that encloses a set of control points is called convex hull

Parametric continuity conditions Imposed at connection points to ensure smooth transitions from one curve to another Types  Zero order parametric continuity
curves simply meet


First order parametric continuity


first parametric derivatives of coordinate functions for two successive curve sections are equal at joining point

Second order parametric continuity


first & second parametric derivatives of the two curve sections are a the same at intersection

Bezier Curves & Surfaces


can be fitted to any no. of control points y degree of bezier polynomial is determined by the number of control points and their relative position Bezier curve is specified by  Boundary conditions  Characterising matrix  Blending function
y

Bezier Curves & Surfaces


Given:
no. of control points is n+1 Pk = (xk ,yk ,z k ) with k varying from 0 to n The position vector P(u) that describes the path of an approximating bezier polynomial function is produced by blending the coordinates P(u) = k p k BEZ k,n (u) the blending function, BEZ k,n (u) = C(n,k)uk (1-u) n-k

Bezier Curves
Individual curve coordinates x(u) = k x k BEZ k,n (u) y(u) = k y k BEZ k,n (u) z(u) = k z k BEZ k,n (u) Properties  Curve always passes through first and last control points  Curve always lies within the convex hull  The blending function are all positive & their sum is always one  Values of parametric first derivatives at endpoints are PI (0) = - np0 + np1 PI (1) = -npn-1 + npn  Values of parametric second derivatives are PII (0) = n(n-1)[(p2 p1 ) - (p1 p0) PII (1) = n(n-1)[(pn-2 pn-1 ) - (pn-1 pn)

Bezier Surfaces
have the same properties as bezier curves y provides convenient methods for interactive design applications
y

Octree encodings
Hierarchical tree structure y Node corresponds to a region in 3D space y Extension of quadtree encodings(2D) Quadtrees: - divide the 2D region into quadrants
y
- each node has 4 data elements - if all pixels within a quadrant have same color, the corresponding data element in the node stores the color - otherwise the quadrant is divided into quadrants the data element in the node stores the pointer to the next node in the quadtree

Octree encodings
Quadtrees:
Each node can have at most 4 immediate descendants Since each color area is represented with one node memory requirement is reduced

Octree
-divides

3D space into octants -Stores 8 data elements in each node


-Individual elements

of 3D space are called voxels -If all voxels in an octant are of same type the value is stored in the corresponding data element of the node -Otherwise the octant is subdivided into octants & the corresponding data element in the node points to the next node -Each node can have 0 to 8 immediate descendants`

Fractal Geometry Methods


Used to model natural objects (clouds,mountains etc.) y Procedures are used to model the objects Characteristics of fractal objects  Infinite detail at every point  Self similarity between object parts Fractal Generation Procedure Repeated application of a specified transformation function to points within a region of space
y
If P0 = (x0 , y0 ,z0 ) & transformation function is F ,then P1 = F(P0 ) , P2 = F(P1 ) , P3 = F(P2 ) F may be one of the following
y y y

Scaling Translation rotation

Fractal Geometry Methods


Classification of fractals  Self similar fractals  Self affine fractals  Self squaring fractals  Self inverse fractals Self similar fractals they have parts that are scaled down version of entire object Self affine fractals they have parts that are formed with different scaling parameters in different coordinate directions Self squaring fractals formed with squaring functions Self inverse fractals formed with inversion procedures

Fractal Geometry Methods


Fractal Dimension ( D ) y number - describes the amount of variation in the object details y for self similar objects obtained from n . sD = 1 D = ln n/ ln(1/s) n no. of subparts s scaling factor

Fractal Geometry Methods


Estimation of fractal dimension - estimated by Box Covering method - use rectangles or parallelopipeds Box covering method
determine the coordinate extent of the object y subdivide the object into a number of small boxes using the given scaling factors y count the number of covering boxes (n) y fractal dimension is determined using the eqn. D = ln n/ ln(1/s) Box dimension no. of boxes taken to cover an object
y

Fractal Geometry Methods


Geometric construction of deterministic self similar fractals - Using 2 shapes namely  Initiator (given geometric shape)  Generator (pattern obtained by replacing subparts of initiator) Geometric construction of Statistically self similar fractals - 2 ways 1. Choosing generator randomly 2. Compute coordinate displacement randomly

Fractal Geometry Methods


Affine Fractal Construction Methods 1. Random midpoint displacement method 2. Fractional brownian motion
Brownian motion describes the erratic ,zigzag movement of particles in a gas or other fluid

Self squaring fractals Strategy :


apply repeatedly a self squaring function on an initial position

Fractal Geometry Methods


Self Inverse Fractal
Strategy Repeated application of a non linear inversion function to an initial point

Particle system
y y y y

Used to model natural objects or other irregular shaped objects Random processes are used to generate objects Parameters of the objects vary over time The path and surface characteristics of the particle may be color coded and displayed

Visualization of data sets


Types  Scientific visualization  Business visualization Data types y Scalar has single value y Vector has magnitude & direction y Tensors 9 components rep. by 3 x 3 matrix y Multivariate mixture of scalar ,vector & tensor

Visualization of data sets


Visual representation of scalar field Methods:
y

graphs, charts ,color coding ,contour plot Contour plot display isolines(lines of constant scalar values) for a data set distributed over a surface Volume rendering - similar to X-ray picture - interior information of a data set is projected to a display screen

Visualization of data sets


Visual representation of vector field Methods:  Plotting data points as a small arrow  Field line/ stream line Visual representation of Tensor field Method:  Reduce tensor to vector or scalar Visual representation of multivariate data sets Method:  Glyphs ( graphical object with multiple parts)

3D Geometric & Modeling Transformations


Translation PI = T .P xI = x + tx yI = y + ty zI = z + tz Inverse translation - obtained by negating translation distances

3D Geometric & Modeling Transformations


Rotation To perform rotation we need, 1. An axis 2. Rotation angle +ve rotation angles produce counter clockwise rotation -ve rotation angles produce clockwise rotation

3D Geometric & Modeling Transformations


Coordinate axis rotation
Z axis rotation xI = xCos ySin yI = xSin + yCos zI = z PI = Rz( ).P

3D Geometric & Modeling Transformations


Coordinate axis rotation X axis rotation yI = yCos zSin zI = ySin + zCos xI = x PI = Rx( ).P

3D Geometric & Modeling Transformations


Coordinate axis rotation Y axis rotation zI = zCos xSin xI = zSin + xCos yI = y PI = Ry( ).P

3D Geometric & Modeling Transformations


General 3D Rotations
Rotation axis parallel to coordinate axes Perform Translation (coincide the rotation axis with parallel coordinate axis) Rotation Inverse translation (move the object back to its original position)
1.

PI = T-1 . Rx ( ) . T . P

3D Geometric & Modeling Transformations


General 3D Rotations
2.

Rotation axis not parallel to coordinate axes Translation (make rotation axis passes through coordinate origin) Rotation (make rotation axis coincide with one of the coordinate axes) Specified rotation Inverse rotation Inverse translation

Perform
y y y y y

3D Geometric & Modeling Transformations


PI = S . P xI = x . sx yI = y . sy zI = z . sz Transformation sequence  translation  scaling  inverse translation

3D Viewing
Viewing transfers positions from world coordinate plane to pixels positions in the plane of the output device Viewing pipeline: MC MT WC VT VC PT PC WT DC

Transformation from world to viewing coordinates: sequences 1. Translate view reference point to the origin of world coordinate system 2. Apply rotation to align xv , yv , zv axes with the world xw ,yw ,zw axes

Projections: 2 types 1. Parallel projection 2. Perspective projection Parallel projection:


Coordinate positions are transformed to view plane along parallel lines - Preserves relative proportions of objects - Does not give realistic representation Types:  Orthographic parallel projection  Oblique parallel projection
-

- Orthographic parallel projection projection is perpendicular to view plane - Oblique parallel projection projection is nor perpendicular to view plane - Axonometric Orthographic projection displays more than one face of the object

Vanishing point It is the point at which a set of projected parallel lines appear to converge Principal vanishing point It is a vanishing point for any set of lines that are parallel to one of the principal axes of an object

Clipping -uses unit cube to perform clipping Unit cube normalized view volume Region code 6 bits Bit 1 =1 if x <xvmin Bit 2 =1 if x > xvmax Bit 3 =1 if y < yvmin Bit 4 =1 if y > yvmax Bit 5 =1 if z < zvmin Bit 6 =1 if z >zvmax

Clipping uses parametric line equations x = x1 + (x2 - x1)u y = y1 + (y2 - y1)u z = z1 + (z2 - z1)u if viewport plane is zv, u = zvmin z1 /z2 - z1 X & Y intersections are x = x1 + (x2 - x1) (zvmin z1 /z2 - z1 ) y= y1 + (y2 - y1) (zvmin z1 /z2 - z1 )

3D viewing functions
evaluateViewOrientationMatrix3()  evaluateViewMappingMatrix3()  setViewRepresentation3()  setViewIndex()  setWorkstationWindow3()  setWorkstationViewport3()


Computer Animation
Animation time sequence of visual a scene Applications :  Advertising  Education  Entertainment  Scientific & engineering studies  Training changes in

Computer Animation
Steps in animation sequence:  Storyboard layout  Object definitions  Key frame specification  Generation of in-between frames Storyboard y Outline of action y Defines the motion sequence as a set of basic events

Computer Animation
Object definition defines y Object shapes y Associated movements Keyframe y detailed drawing of the scene at a certain time in animation sequence In-between y Intermediate frames between key frames y Depends upon the media

Computer Animation
Animation Functions:  Storing & managing object database  Motion generation  Object rendering  Simulation of camera movements Computer animation languages: C,Lisp,Pascal,FORTRAN  Keyframe system  Parameterized system  Scripting system

Computer Animation
Color table transformation - animate objects along 2D motion paths Steps:
y y y y y y

Predefine object at successive positions along the motion path Set successive block of pixel value to color table entries Set the pixels at first position of the objects to on values Set the pixels at other object positions to the background color Change the color table value of the pixel of the object for successive positions Set the preceding position to the background intensity

Computer Animation
Morphing transformation of object shapes from one form to another Motion specification:  Direct motion specification - uses either geometric transformation matrices or
approximating equation

 

Goal directed system - motion are specified as general terms Kinematics and dynamics - by giving motion parameters & force

Visible Surface Detection Methods


Visible Surface Detection
It is the process of identifying the parts of a scene that are visible from a chosen viewing position Classification of algorithms y Object - space method y Image - space method

Visible Surface Detection Methods


Object-space method compares objects and parts of objects to each other within the scene definition to determine which surfaces as a whole we should label as visible y Image-space method visibility is decided point by point at each pixel position on the projection plane
y

Visible Surface Detection Methods Back face Detection


A point (x,y,z) is inside a polygon surface with plane parameters A,B,C and D if Ax+By+Cz+D < 0 When an inside point is along the line of sight to the surface , the polygon must be a back-face

Back face Detection


Conditions for back face:
A polygon is a back-face if V.N > 0
V vector in viewing direction N normal vector to polygon

If viewing direction is parallel to ZV axis then V.N = VZ C - In a right handed viewing system (viewing along ve ZV
axis ) ,the ploygon is a back-face if normal vector has Z component C <= 0
-

In a left handed viewing system (viewing along +ve ZV


axis ) ,the ploygon is a back-face if normal vector has Z component C >= 0

Image space method Compares surface depth at each pixel position on the projection plane Object depth is usually measured from the view plane along the Z axis of the viewing system

Depth Buffer Method (Z- buffer method) (ZSteps: 1. Initialize the depth buffer and refresh buffer so that for all the buffer positions (x,y) depth(x,y) = 0 , refresh(x,y) = I backgnd 2. For each position on each polygon surface listed on the polygon table calculate the depth value and compare the depth vaslue to the previously stored values in the depth buffer to determine visibility Let the calculated depth be Z for each position (x,y) If Z > depth(x,y) , then set ) depth(x,y) = Z , refresh(x,y) = Isurf (x,y) I backgnd - background intensity Isurf - projected intensity value for the surface

Depth value for the surface position is calculated from the plane equation Z = ( - Ax - By D ) / C Depth ZI at new position - For horizontal processing ZI = Z (A/C) - For vertical processing ZI = Z + (B/C)

A-Buffer Method

Você também pode gostar