Presentation is loading. Please wait.

Presentation is loading. Please wait.

Three-Dimensional Object Representation

Similar presentations


Presentation on theme: "Three-Dimensional Object Representation"— Presentation transcript:

1 Three-Dimensional Object Representation
Chapter 10 Three-Dimensional Object Representation

2 Introduction Graphics scenes can contain many different kinds of objects No one method can describe all these objects Accurate models produce realistic displays of scenes Polygon and quadric surfaces Spline surfaces and construction techniques Procedural methods Physically-based modeling methods Octree encodings Boundary representations (B-reps) Space-partitioning representations

3 Polygon Surfaces The most commonly used boundary represent-ation
All surfaces are described with linear equations Simplify and speed up surface rendering and display of objects Precisely define a polyhedron For non-polyhedron objects, surfaces are tesselated Commonly used in design and solid modeling The wireframe outline can be display quickly

4 Polygon Tables Specify a polygon surface Geometric tables
Vertex coordinates Spatial orientation of the polygon Attribute tables Degree of transparency Surface reflectivity Texture

5 Polygon Tables Convenient organization for geometric data Vertex Table
Edge Table Polygon Table v1 E3 E6 E1 S1 S2 v3 v5 E2 E4 E5 v2 v4

6 Polygon Tables

7 Polygon Tables Alternative arrangements
Use just two tables: a vertex table and a polygon table Some edges could get drawn twice Use only a polygon table This duplicates coordinate information Extra information to the data tables Expand the edge table to include forward pointers into the polygon table Common edges between polygons Expand vertex table to contain cross-reference to corresponding edges

8 Polygon Tables Additional geometric information
The slope for each edge Coordinate extents for each polygon Tests for consistency and completeness Every vertex is an endpoint for at least two edges Every edge is part of at least one polygon Every polygon is closed Each polygon has at least one shared edge Every edge referenced by a polygon pointer has a reciprocal pointer back to the polygon

9 Plane Equations The equation for a plane surface Ax + By + Cz +D = 0
By Cramer’s rule: Values of A,B,C and D are computed for each polygon and stored with the other polygon data

10 Plane Equations Orientation of a plane surface
Surface normal vector (A, B, C) Distinguish two sides of a surface “Inside” face “Outside” face The normal vector from inside to outside Viewing the outer side of the plane in a right-handed coordinate system Vertices are specified in counterclockwise direction

11 Plane Equations N=(A,B,C)

12 Plane Equations

13 Plane Equations Identify a point (x, y, z) as either inside or outside a plane surface In a right-handed coordinate system, the plane parameters A, B, C, and D were calculated using vertices selected in a counterclockwise order when viewing the surface in an outside-to-inside direction. If Ax+By+Cz+D<0, the point(x,y,z) is inside the surface If Ax+By+Cz+D>0, the point(x,y,z) is outside the surface

14 Bezier Curves A spline approximation method Developed by Pierre Bezier
Renault automobile bodies Given n + 1 control points Bernstein polynomials

15 Bezier Curves The degree of the Bezier polynomial
One less than the number of control points used. The relative position of control points With certain placements, we obtain degenerate Bezier polynomials.

16 Properties of Bezier Curves
It always passes through the first and last control points. Values of the parametric first derivatives The slope at the beginning of the curve is along the line joining the first two control points. The slope at the end of the curve is along the line joining the last two control points

17 Properties of Bezier Curves
The parametric second derivative The Bezier blending functions They are all positive. Their sum is always 1: The convex-hull property is hold

18 Design Techniques Using Bezier Curves
Closed Bezier curves Specifying the first and last control points at the same position. Multiple control points Specifying multiple control points at a single coordinate position gives more weight to that position.

19 Cubic Bezier Curves Four blending functions for cubic Bezier curves
Blending function BEZ 1,3 is maximum at u = 1/3. Blending function BEZ 2,3 is maximum at u = 2/3. Bezier curves do not allow for local control of the curve shape.

20 Cubic Bezier Curves

21 Cubic Bezier Curves

22 Bezier Surfaces The Bezier surface
Its parametric vector function is formed as the Cartesian product of Bezier blending functions

23 B-Spline Curves B-splines have two advantages over Bezier splines:
The degree is independent of the number of control points. Allow local control of the shape. Blending function formulation The range of parameter u depends on how we choose the B-spline parameters. B k,d are polynomials of degree d - 1.

24 B-Spline Curves B-spline blending functions
Cox-deBoor recursion formulas: Knot vector: The selected set of subinterval endpoints u j. We can choose any value for the subinterval endpoints satisfying the relation u j+1  u j

25 B-Spline Curves

26 B-Spline Curves Values for umin and umax depend on:
The number of control points we select. The value we choose for parameter d. How we set up the subintervals.

27 B-Spline Curves Properties of B-spline curves
Have degree d - 1 and C d-2 continuity over the range of u. For n + 1 control points, the curve is described with n + 1 blending functions. Each B k,d is defined over d subintervals, starting at knot value u k. The range of parameter u is divided into n + d subintervals by n + d + 1 knot values. With knot values {uo, u1, ..., u n+d}, the resulting B-spline curve is defined from u d-1 to u n+1. Any one control point can affect the shape of at most d curve sections.

28 B-Spline Curves Convex Hull property
The B-spline curve holds the property. For any parameter value of u in the interval from knot value u d-1 to u n+1, the sum over all basis functions is 1. For different knot vectors, there are three classes: Uniform Open uniform Non-uniform

29 Uniform, Periodic B-Splines
Uniform B-spline The spacing between knot values is constant. {-1.5,-1.0,-0.5,0.0,0.5,1.0,1.5,2.0} Often normalized to the range between 0 and 1. {0.0,0.2,0.4,0.6,0.8,1.0} Uniform B-splines have periodic blending functions. Periodic blending function For given values of n and d, all blending functions have the same shape. Each successive blending function is simply a shifted version of the previous function:

30 Uniform, Periodic B-Splines

31 Uniform, Periodic B-Splines

32 Uniform, Periodic B-Splines
Example: d = n = 3 Knot vector = {0, 1, 2, 3, 4, 5, 6} The slope at the start position is parallel to the line joining the first two control points. The slope at the end position is parallel to the line joining the last two control points. p1 p2 Pstart =1/2(P0+P1) Pend =1/2(P2+P3) P’start = P1 -P0 p0 P’end = P3 -P2 p3

33 Cubic, Periodic B-Splines
For cubics, d = 4 and each blending function spans four subintervals. If we are to fit the cubic control points,then we could use the integer vector {0,1,2,3,4,5,6,7} An alternate formulation: start with the boundary conditions, normalized interval u[0,1]

34 Cubic, Periodic B-Splines
A matrix formulation for a cubic periodic B-spline with four control points

35 Cubic, Periodic B-Splines
Example: A closed, periodic, piecewise, cubic B-spline constructed with cyclic specification of the six control points.

36 Open, Uniform B-Splines
A class between uniform and nonuniform B-splines Knot spacing is uniform except at the ends where knot values are repeated d times. Example: {0, 0, 1, 2, 3, 3}, for d = 2 and n = 3 {0, 0, 0, 0, 1, 2, 2, 2, 2}, for d = 4 and n = 4 For any d and n, the knot vector

37 Open, Uniform B-Splines
Characteristics are very similar to Bezier splines When d = n + 1, open B-splines reduce to Bezier splines, all knot values are either 0, or 1. Example: a cubic, open B-splines (d = 4) Knot vector = {0, 0, 0, 0, 1, 1, 1, 1} An open B-spline passes through the first and last control points. Specifying multiple control points at the same coordinate position pulls curve closer.

38 Nonuniform B-Splines Nonuniform B-splines
We can specify any values and intervals for the knot vector. {0, 1, 2, 3, 3, 4} {0, 2, 2, 3, 3, 6} {0, 0.2, 0.6, 0.9, 1.0} Provides increased flexibility in controlling a curve shape. Multiple knot values reduce the continuity by 1 for each repeat of a particular value.

39 B-Spline Surfaces The Cartesian product of B-spline blending functions in the form: Where are (n1 + 1) by (n2 + 1) control points


Download ppt "Three-Dimensional Object Representation"

Similar presentations


Ads by Google