Presentation is loading. Please wait.

Presentation is loading. Please wait.

Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011.

Similar presentations


Presentation on theme: "Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011."— Presentation transcript:

1 Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011

2 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

3 Review of Bézier Curves DeCastlejau Algorithm V2V2 V4V4 V1V1 V3V3 Insert at t = ¾

4 Review of Bézier Curves DeCastlejau Algorithm 001 000 111 011 Insert at t = ¾ Ignore funny notation at vertices! (= CS 284 stuff )

5 Review of Bézier Curves DeCastlejau Algorithm 001 000 111 011 00¾ ¾11 0¾1 Insert at t = ¾

6 Review of Bézier Curves DeCastlejau Algorithm 001 000 111 011 00¾ ¾¾1 ¾11 0¾10¾1 0¾¾ Insert at t = ¾

7 Review of Bézier Curves DeCastlejau Algorithm 001 000 111 011 00¾ ¾¾1 ¾11 0¾1 0¾¾ ¾¾¾ Insert at t = ¾

8 Review of Bézier Curves DeCastlejau Algorithm 001 000 111 011 00¾ ¾¾1 ¾11 0¾1 0¾¾ ¾¾¾ Insert at t = ¾ Curve position and tangent for t = ¾

9 Subdivision of Bézier Curves 001 000 111 011 00¾ ¾¾1 ¾11 0¾1 0¾¾ ¾¾¾ Insert at t = ¾ This also yields all control points for subdivision into 2 Bezier curves

10 Subdivision of Bézier Curves 001 000 111 011 00¾ ¾¾1 ¾11 0¾1 0¾¾ ¾¾¾ Insert at t = ¾ Convex Hull Property!

11 Bézier Curves Summary DeCastlejau algorithm is good for –Evaluating position(t) and tangent(t), –Subdividing the curve into 2 subcurves with their own control polygons. Subdivision of Bézier curves and their convex hull property allows for: –Adaptive rendering based on a flatness criterion, –Adaptive collision detection using line segment tests.

12 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

13 Subdivision Curves V20V20 V40V40 V10V10 V30V30 Subdivision is a recursive 2 step process –Topological split –Local averaging / smoothing Limit curve An approximating scheme

14 Subdivision Curves V20V20 V40V40 V10V10 V30V30 Subdivision is a repeated 2 step process –Topological split –Local averaging / smoothing E20E20 E40E40 E10E10 E30E30

15 Subdivision Curves V20V20 V40V40 V10V10 V30V30 Subdivision is a repeated 2 step process –Topological split –Local averaging / smoothing E21E21 E41E41 E11E11 E31E31 V21V21 V11V11 V41V41 V31V31

16 Subdivision Curves V20V20 V40V40 V10V10 V30V30 Subdivision is a repeated 2 step process –Topological split –Local averaging / smoothing E21E21 E41E41 E11E11 E31E31 V21V21 V11V11 V41V41 V31V31

17 Subdivision Curves V20V20 V40V40 V10V10 V30V30 Subdivision is a repeated 2 step process –Topological split –Local averaging / smoothing E21E21 E41E41 E11E11 E31E31 V21V21 V11V11 V41V41 V31V31

18 Results in a B-spline Curve 413214324 Knots:

19 Subdivision Curve Summary Subdivsion is a recursive 2 step process: –Topological split at midpoints, –Local averaging/smoothing operator applied. Doubles the number of vertices at each step Subdivision curves are nothing new: –Suitable averaging rules can yield uniform B-spline curves.

20 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

21 Subdivision Overview Subdivision is a two part process: –Topological split –Local averaging / smoothing Control MeshTopological SplitAveraging Limit Surface

22 Subdivision Overview Repeated uniform subdivisions of the control mesh converge to the limit surface. Limit surface can be calculated in closed form for stationary schemes (averaging mask does not change). Control MeshGeneration 1Generation 2Generation 3

23 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces: –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

24 B-spline Surfaces A cubic B-spline surface patch is controlled by a regular 4x4 grid of control points

25 B-spline Surfaces 2 adjacent patches share 12 control points and meet with C 2 continuity

26 B-spline Surfaces Requires a regular rectangular control mesh grid and all valence-4 vertices to guarantee continuity.

27 Catmull-Clark Subdivision Surface Yields smooth surfaces over arbitrary topology control meshes. Closed control mesh  closed limit surface. Quad mesh generalization of B-splines –C 1 at non-valence-4 vertices, –C 2 everywhere else (B-splines). Also: Sharp corners can be tagged –Allows for smooth and sharp features, –Allows for non-closed meshes.

28 Catmull-Clark Subdivision Extraordinary vertices are generated by non-valence-4 vertices and faces in the input mesh. No additional extraordinary vertices are created after the first generation of subdivision. Gen 0Gen 1Gen 2

29 Catmull-Clark Averaging V00V00 V10V10 E10E10 V30V30 V40V40 Vn0Vn0 V20V20 C10C10 F10F10 En0En0 E40E40 E30E30 E20E20 Fn0Fn0 F40F40 F30F30 F20F20 C30C30 C40C40 Cn0Cn0 C20C20 (simple averaging) n = valence

30 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

31 Loop Subdivision Surface Gen 0Gen 1Gen 2 n = valence

32 Summary Subdivision is a 2 step recursive process: –Topological split, –Local averaging / smoothing. It is an easy way to make smooth objects –of irregular shape –of topologies other than rectangular (torus).

33 Outline Review Bézier Curves Subdivision Curves Subdivision Surfaces –Quad mesh (Catmull-Clark scheme) –Triangle mesh (Loop scheme) Fractal Mountains

34 Fractals Self-similar recursive modeling operators: Sierpinski Triangle Koch Snowflake

35 Linear Fractal Mountains 2-step recursive process: –Subdivide chain by creating edge midpoints, –Randomly perturb midpoint positions (proportional to subdivided edge length). Gen 0: Gen 1: Gen 2: Gen 3:

36 Fractal Mountain Surfaces 2-step recursive process: –Subdivide triangles at edge midpoints, –Randomly perturb midpoint positions. Gen 0Gen 1Gen 2

37 Fractal Mountains Summary 2-step recursive process: –Topological split at edge midpoints, –Random perturbation of midpoint positions. Triangle topological split maintains a water-tight connected mesh. Useful to make uneven, “natural” terrain. Often a low-order subdivision is good enough to control terrain-following vehicles.


Download ppt "Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011."

Similar presentations


Ads by Google