Sie sind auf Seite 1von 21

The most commonly used boundary representation for a three-dimensional graphics object is a set of surface polygons that enclose

the object interior. Many graphics systems store all object descriptions as sets of surface polygons.

This simplifies and speeds up the surface rendering and display of objects, since all surfaces are described with linear equations.

Cube is a combination of six square surfaces

An octagonal prism has 8 octagonal faces and 8 rectangles

A polygon representation for a polyhedron precisely defines the surface features of the object. But for other objects, surfaces are tessellated (or tiled) to produce the polygon-mesh approximation.

Wire frame representation of a cylinder

We specify a polygon surface with a set of vertex coordinates and associated attribute parameters. As information for each polygon is input, the data are placed into tables that are to be used in the subsequent processing, display, and manipulation of the objects in a scene. Polygon data tables can be organized into two groups: geometric tables and attribute tables.

Geometric data tables contain vertex coordinates and parameters to identify the spatial orientation of the polygon surfaces. Attribute information for an object includes parameters specifying the degree of transparency of the object and its surface reflectivity and texture characteristics. A convenient organization for storing geometric data is to create three lists: a vertex table, an edge table, and a polygon table.

The equation for plane surface can be expressed In the form Ax + By + Cz + D = 0 where (x, y, z) is any point on the plane, and the coefficients A, B, C, and D are constants describing the, spatial properties of the plane. We can obtain the values of A, B, C, and D by solving a set of three plane equations using the three non collinear points in the plane.

For this purpose, we can select three successive polygon vertices, (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3), and solve the following set of simultaneous linear plane equation5 for the ratios A/D, B/D, and C/D: (A/D)xk + (B/D)yk + (C/D)zk = -1 K= 1, 2, 3

The solution ior this set ot equations can be obtained in determinant form, using Cramer's rule, as

1 A= 1 1

Y1 Y2 Y3

Z1 Z2 Z3 B=

X1 X2 X3

1 1 1

Z1 Z2 Z3

X1 C= X2 X3

Y1 Y2 Y3

1 1 1 D= -

X1 X2 X3

Y1 Y2 Y3

Z1 Z2 Z3

A = Y1(Z2 - Z3) + Y2(Z3 Z1) + Y3(Z1 Z2)


B = Z1(X2 - X3) + Z2(X3 X1) + Z3(X1 X2) C= X1(Y2 - Y3) + X2(Y3 Y1) + X3(Y1 Y2) D = -X1(Y2 Z3 Y3 Z2) - X2(Y3 Z1 - Y1 Z3) X3(Y1 Z2 Y2 Z1) Orientation of a plane surface in space. can be described with the normal vector to the plane, as shown in the figure. This surface normal vector has Cartesian components (A, B, C)

N(A,B,C)

V1(1,1,0)

V1(1,1,1)
V3(1,0,0)

The face of the adjacent cube has a normal N(1, 0, 0) which is obtained by solving the equations from the vertices V1,V2,V3

The normal can also be Calculated by the cross product of three vertices taken in anti clockwise direction: N = (V2 V1) X (V3 V1) Also, for any position P on the plane N.P=-D
For any point not on the plane: N . P = D if Ax + By + Cz + D > 0 the point is outside the surface

if Ax + By + Cz + D < 0 the point is inside the surface

A frequently used class of objects are the quadric surfaces, which are described with second-degree equations (quadratics)

They include spheres, ellipsoids, tori, paraboloids, and hyperboloids.

In Cartesian coordinates, a spherical surface with radius r centred on the coordinate origin is defined as the set of points (x, y, z) that satisfy the equation: X2 + Y2 + Z2 = r2 We can also describe the spherical surface in parametric form, using latitude and position (r, , f) on the longitude angles

X = r cos cos -p/2 <= <= p/2 Y = r cos sin -p<= <= p Z = r sin
Z

P= (X,Y,Z)

In Cartesian coordinates, a Ellipsoid surface with radii rx, ry, rz centred on the coordinate origin is defined as the set of points (x, y, z) that satisfy the equation: (X2/rx2)+ (Y2/rx2) + (Z2/rz2) = r2 We can also describe the spherical surface in parametric form, using latitude and position (r, , f) on the longitude angles

X = rx cos cos Y = rx cos sin Z = rx sin

-p/2 <= <= p/2 -p<= <= p

A torus is a doughnut-shaped object, as shown in the figure. It can be generated by rotating a circle or other conic about a specified axis. The Cartesian representation for points over surface of the torus is represented as:

where r is any given offset value.

Parametric representations for a torus are similar to those for an ellipse, except that angle extends over 360. Using latitude and longitude angles 4 and 8, we can describe the toms surface as the set of points that satisfy: x = rx (r + cos )cos y = ry (r + cos )cos z = rz (r sin )

A torus with a circular cross section centred on the coordinate origin.

Das könnte Ihnen auch gefallen