Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.

Similar presentations


Presentation on theme: "Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics."— Presentation transcript:

1 Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics

2 Object Representations ● Types of objects: geometrical shapes, trees, terrains, clouds, rocks, glass, hair, furniture, human body, etc. ● Not possible to have a single representation for all – Polygon surfaces – Spline surfaces – Procedural methods – Physical models – Solid object models – Fractals – ……

3 Spline Representations ● Spline curve: Curve consisting of continous curve segments approximated or interpolated on polygon control points. ● Spline surface: a set of two spline curves matched on a smooth surface. ● Interpolated: curve passes through control points ● Approximated: guided by control points but not necessarily passes through them. Interpolated Approximated

4 ● Convex hull of a spline curve: smallest polygon including all control points. ● Characteristic polygon, control path: vertices along the control points in the same order.

5 ● Parametric equations: ● Parametric continuity: Continuity properties of curve segments. – Zero order: Curves intersects at one end-point: C 0 – First order: C 0 and curves has same tangent at intersection: C 1 – Second order: C 0, C 1 and curves has same second order derivative: C 2

6 ● Geometric continuity: Similar to parametric continuity but only the direction of derivatives are significant. For example derivative (1,2) and (3,6) are considered equal. ● G 0, G 1, G 2 : zero order, first order, and second order geometric continuity.

7 Spline Equations ● Cubic curve equations: ● General form: ● M s : spline transformation (blending functions) M g : geometric constraints (control points)

8 Natural Cubic Splines ● Interpolation of n+1 control points. n curve segments. 4n coefficients to determine ● Second order continuity. 4 equation for each of n-1 common points: 4n equations required, 4n-4 so far. ● Starting point condition, end point condition. ● Assume second derivative 0 at end-points or add phantom control points p -1, p n+1.

9 ● Write 4n equations for 4n unknown coefficients and solve. ● Changes are not local. A control point effects all equations. ● Expensive. Solve 4n system of equations for changes.

10 Hermite Interpolation ● End point constraints for each segment is given as: ● Control point positions and first derivatives are given as constraints for each end-point.

11 Hermite curves These polynomials are called Hermite blending functions, and tells us how to blend boundary conditions to generate the position of a point P(u) on the curve

12 Hermite blending functions

13 Hermite curves ● Segments are local. First order continuity ● Slopes at control points are required. ● Cardinal splines and Kochanek-Bartel splines approximate slopes from neighbor control points.

14 Bézier Curves ● A Bézier curve approximates any number of control points for a curve section (degree of the Bézier curve depends on the number of control points and their relative positions)

15 ● The coordinates of the control points are blended using Bézier blending functions BEZ k,n (u) ● Polynomial degree of a Bézier curve is one less than the number of control points. 3 points : parabola 4 points : cubic curve 5 points : fourth order curve

16 Cubic Bézier Curves ● Most graphics packages provide Cubic Béziers.

17 Cubic Bézier blending functions The four Bézier blending functions for cubic curves (n=3, i.e. 4 control pts.) p0p0 p1p1 multiplied with p2p2 p3p3

18 Properties of Bézier curves ● Passes through start and end points ● First derivates at start and end are: ● Lies in the convex hull

19 Joining Bézier curves ● Start and end points are same (C 0 ) ● Choose adjacent points to start and end in the same line (C 1 ) ● C 2 continuity is not generally used in cubic Bézier curves. Because the information of the current segment will fix the first three points of the next curve segment n and n ’ are the number of control points in the first and in the second curve segment respectively

20 Bézier Surfaces ● Two sets of orthogonal Bézier curves are used. ● Cartesian product of Bézier blending functions:

21 Bézier Patches ● A common form of approximating larger surfaces by tiling with cubic Bézier patches. m=n=3 ● 4 by 4 = 16 control points.

22 Cubic Bézier Surfaces ● Matrix form ● Joining patches: similar to curves. C 0, C 1 can be established by choosing control points accordingly.


Download ppt "Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics."

Similar presentations


Ads by Google