Modeling Modeling is simply the process of creating 3D objects

Slides:



Advertisements
Similar presentations
Lecture 14 Curves and Surfaces II
Advertisements

Splines IV – B-spline Curves
Curves Jim Van Verth Essential Math for Games Animation Problem: want to replay stored set of transformations  Generated by.
Lecture Notes #11 Curves and Surfaces II
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
© University of Wisconsin, CS559 Spring 2004
Lecture 10 Curves and Surfaces I
Geometric Modeling Notes on Curve and Surface Continuity Parts of Mortenson, Farin, Angel, Hill and others.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
ICS 415 Computer Graphics Bézier Splines (Chapter 8)
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
Dr. S.M. Malaek Assistant: M. Younesi
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
1 Computer Graphics Chapter 7 3D Object Modeling.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
Modelling: Curves Week 11, Wed Mar 23
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Splines III – Bézier Curves
Computer Graphics Lecture 13 Curves and Surfaces I.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
Curve Modeling Bézier Curves
Computer Graphics Modeling.
Bresenham’s Algorithm. Line Drawing Reference: Edward Angel’s book: –6 th Ed. Sections 6.8 and 6.9 Assuming: –Clipped (to fall within the window) –2D.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
(Spline, Bezier, B-Spline)
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
Geometric Modelling 2 INFO410 & INFO350 S Jack Pinches
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Representation of Curves and Surfaces Graphics.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
11/26/02(C) University of Wisconsin Last Time BSplines.
(c) 2002 University of Wisconsin
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
CS5500 Computer Graphics May 11, 2006
Curve & Surface.
CS 445 / 645 Introduction to Computer Graphics
POLYGON MESH Advance Computer Graphics
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
UNIT-5 Curves and Surfaces.
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Modeling Modeling is simply the process of creating 3D objects Many different processes to create models Many different representations of model data Once the models are obtained, one can transform them to the correct locations in space, place a virtual camera in space, and render a 2D image of the scene

1 Polygonal Complex objects are broken down into many simple polygons Polygons form the “skin” of the object Objects are hollow Polygons have a front face and a back face

Triangulation How are triangles obtained? Triangulating a set of surface points Several different triangulation approaches Delaunay triangulations attempt to equalize triangle angles (reduces long skinny triangles)

How Many Triangles? More triangles are needed in surface areas that require more geometric detail Higher curvature  more triangles necessary

Level Of Detail (LOD) It can be very costly to always display an entire object at the greatest level of detail Less detail is necessary the farther away you are from on object Also depends on the viewing angle and screen size Solution: create several models of the object at different levels of detail Display the correct one for the viewing distance

LOD 50 Vertices 500 Vertices 2000 Vertices

LOD How to create the same model in multiple levels of detail? Ex: start with most detailed, resample with less vertices, and then re-triangulate When to switch models when rendering? Based on distance and screen size Ex: 640x480 screen  307,200 pixels Object takes up half of screen  150K pixels  Any more than 300K triangles (half are facing away from the camera) is overkill at this distance and screen size Visual artifacts can occur at switching point

Creating the Surface Points Triangulation works on a set of points One needs to create this surface point set Many different approaches: Manual placement Mathematical (geometrical) generation Scanning real objects

Mathematical Generation Solids of Revolution Rotation of a cross-section around an axis Spheres Cones Cylinders

Mathematical Generation Extrusion Extrude a cross-section along a profile curve Scale may vary along the profile Many metal and plastic parts Cones Cylinders Bottles

Scanning Real Objects Laser scanning Tomographic methods                                                                                                                Scanning Real Objects Laser scanning Tomographic methods Medical scanning (Xray, CT, MRI) Radar Recovered 3D model Hand-held laser scanner                                                           Slice of brain from CT scan Recovered 3D model of lungs

Triangle Representations Graphics cards do most of the triangle work Need an efficient way to send triangles to the card Some typical primitive triangle representations: Lists Fans Strips 1.6 vertices per triangle 1.5 vertices per triangle 3.0 vertices per triangle

Constructive Solid Geometry Unlike polygonal approaches, CSG models are “solids” Polygonal models are “skins” Solid approaches are often better suited for medical applications because Cutting slices through objects Representing internal functional data

CSG Trees CSG models are stored in trees Leaves are primitive shapes Spheres, Cubes, Cones, etc. Nodes are Boolean operations Union, Difference, Intersection

CSG Operations Primitives: Union: Intersection: Difference:

CSG Rendering CSG models can be rendered by: Computing surface points and triangulating Rendering can then be performed by standard hardware Use of special CSG rendering routines Not hardware optimized

Representing Curves There are many different methods of representing general curves (rather than attempt to model all surfaces as some existing function, say a Sine or Cosine). The most common are: Cubic Splines Bezier Curves B-splines NURBS and -splines

Curve Fitting Find a simple formula that follows the trend of given discrete data points Allows positions in between data points to be calculated and drawn Satisfies a pre-specified amount of smoothness

Curve Fitting Two approaches Interpolation – fit the discrete data points exactly Approximation – follow the trend of the data points closely, but satisfy other criteria, e.g. satisfy a pre-specified amount of smoothness

Curve Fitting General approach build the curve fitting function from a restricted class of easily computed functions Usually polynomials of low degree Sine and cosine functions are common in theoretical curve fitting applications (e.g. smoothing of data), but in practice these may be computationally too expensive.

Curve Fitting Parametric representation, parameter t Case of 2 control points P0 , P1 , P0 , P1 , may be points in 2D, or in 3D bi(t) are basis functions – fixed. bi(t) “blend” points P0 , P1

Linear Interpolation Case of 2 control points P0 , P1 , parameter t b0(t)=1-t, b1(t)=t are the basis functions. Polynomial of degree 1 b0(t) + b1(t)= (1-t) + t = 1 for all t Q(t) : straight line join between P0 and P1

Curve Fitting Parametric representation, parameter t P0 , P1 , P2 , P3 may be points in 2D, or in 3D bi(t) are basis functions – fixed. bi(t) “blend” points P0 , P1 , P2 , P3

Curve Fitting Case of 4 control points P0 , P1 , P2 , P3 , As t varies (e.g. between 0 and 1), Q(t) assumes different point values a weighted combination of P0 , P1 , P2 , P3 weights vary, via bi(t), with t

Curve Fitting Weights bi(t) are commonly chosen to be cubic polynomials in t Polynomial evaluation requires only arithmetic operations (+,-,*)

Curve Fitting A cubic polynomial has 4 coefficients, and can be determined from the data of 4 points. The cubic is the lowest degree polynomial that can accommodate a non-planar path (3 points define a plane, so need the 4th out of plane point)

Interpolation vs. Approximation Given a set of n points, to create a curve we either interpolate the points (curve passes through all points) approximate the points (points describe convex hull of curve) Points on curve = knot points Points on convex hull (off curve) = control points Interpolate Approximate Control points Convex hull knot points

Splines If we have more than 4 points we require a polynomial of higher degree higher degree polynomials are more difficult to control they exhibit unwanted wiggles (oscillations) Quadratic Cubic Quartic Quintic

Splines In general we use cubic polynomials for curves in CG: minimal wiggles and faster to compute than high degree polynomials lowest degree which allows non-planar curves (quadratics require 3 points, 3 points always lie in the same plane)

Defining the Cubic Spline Normally we supply 4 points we wish the spline to pass through. If we have more than 4 points we must employ more than 1 spline  use a piecewise cubic polynomial for n points, we have (n-1)/3 individual cubic segments without further constraints these will not join smoothly non-smooth smooth

Piecewise Polynomial Curves Idea: Use different polynomial functions for different parts of the curve Advantage: Flexibility Local control Issue: Smoothness at “joints” (continuity)

Continuity Continuity Ck indicates adjacent curves have the same kth derivative at their joints

C0 Continuity Adjacent curves share … Same endpoints: Qi(1) = Qi+1(0) Aside: discontinuous curves sometimes called “C-1”

C1 Continuity Adjacent curves share … Same endpoints: Qi(1) = Qi+1(0) Same derivatives: Qi ’(1) = Qi+1 ’(0)

C2 Continuity Adjacent curves share … Same endpoints: Qi(1) = Qi+1(0) Same derivatives: Qi ’(1) = Qi+1 ’(0) Same second derivatives: Qi ’’(1) = Qi+1 ’’(0)

Examples of Continuity

Parametric Curves and Patches We will start be examining curves Bézier curves B-Spline curves Then we will expand to surface patches Bézier patches B-Spline patches

Curve Fitting The row matrix of polynomials can be written as

Curve Fitting and for Q(t), write

Curve Fitting Substitute:

Bézier Curves Pierre Bézier, a French designer, first used them in the 1960’s in the design of Renault car bodies. Same time de Casteljau (Citroen) Since, they have been heavily used by Adobe in their fonts as well as in graphic applications A Bézier curve is a parametric curve The function C(u) defines the curve points (x, y, z) as the parameter u varies through [0..1]

Bézier Cubics P0 P3 P1 P2

Bézier Cubics For Bézier cubic curves, the coefficients aij are chosen for 4 properties Q(0)=P0 Q(1)=P3 Q’(0) is in the direction of P1 – P0 Q’(1) is in the direction of P3 – P2

Bézier Cubics Example P3 P1 P0 P2

Bézier Cubics Example P3 P1 P0 P2

Bézier Cubics Example P0 P1 P3 P2 P1 –P0 P2 –P3

Bézier Curves The blending functions make much more sense graphically

Bézier Curves Due to the setup of the blending functions: The curve goes through the end points control points P0 and P3 The curve doesn’t go through the interior control points The interior control influence the curve The curve is pulled in the direction of the control point Moving a control point changes the shape of the entire curve (called global control)

Bézier - coefficients The 4x4 matrix coefficients are chosen to satisfy the above 4 properties:

Bézier – Properties check at t=0: So, (property 1)

Bézier – Properties check at t=1: So, (property 2)

Note: Differentiation of the powers of t gives:

Bézier – Properties check first derivative (gradient, velocity) at t: where

Bézier – Properties check first derivative (gradient, velocity) at t=0: So is in the direction of (property 3)

Bézier – Properties check first derivative (gradient, velocity) at t=1: So is in the direction of (property 4)

Piecewise continuity Piecewise Bézier curves can be constructed to have C1 continuity, by ensuring the last two control points (2,3) of one segment first two control points (3,4) of next segment are in line.

Bézier Curves A Bézier Curve can only “curve” as much as its degree allows Degree 1 (linear) is a line Degree 2 (quadratic) can curve once Degree 3 (cubic) can curve twice The number of control points is always 1 larger than the degree

Bézier Curves So what if you want a really “curvy” curve? You could increase the degree of the curve The downfall of this approach is that each control point has global control over the curve shape That is, changing a single control point will modify the shape of the entire curve (not great for modeling) High degree curves are “unstable” It is computationally expensive You could join multiple cubic curves together Each control point only has influence over its piece of the curve (local control w.r.t. the entire joined curve) Hardware can be optimized for cubic curves But, we must maintain continuity across the joins!

Bézier Curves So how are we going to maintain continuity? Notice that the line between the first 2 control points specify the tangent of the curve at t=0 And the line between the last 2 control points specify the tangent of the curve at t=1

Bézier Curves So if we line up P2P3 with Q0Q1, then we have the same tangent at end t=1 point of curve P and t=0 point of curve Q

Bézier Curves Continuity put into more formal terms: C0 continuity means the curve points vary smoothly That is, the curve is a set of connected points For our joined example, it means the two joined segments share the same endpoints P3 is the same point as Q0 C1 continuity means the curve’s first derivatives vary smoothly (plus C0 continuity) For our joined example, it means the tangents at the end endpoints must be the same (P2, P3, Q0, Q1 must form a line) And P0, P1 must form a line with the curve before it and Q2, Q3 must form a line with the curve after it  all 4 control points are constrained to some extent

Bézier Curves C2 continuity means the curve’s second derivatives vary smoothly (plus C1 continuity) Second derivative corresponds to curvature For our joined example, it implies constrains on P1, P2, P3, Q0, Q1, and Q2 Plus P0, P1, and P2 are constrained from the curve before it and Q1, Q2, and Q3 are constrained from the curve after it Thus, although it can be achieved, there are so many constrains on the positions of the control points that joined cubic Bézier curves are almost never C2 continuous

Bézier Curves Do we care about C2 continuity? Probably not for simple modeling But if the curve is being used to specify the path/orientation of a camera: Not C0 means the camera position jumps Not C1 means the camera’s orientation jumps Not C2 means the change in the camera’s orientation has sudden jumps

Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages: Expensive to evaluate the curve at many points No easy way of knowing how fine to sample points, and maybe sampling rate must be different along curve No easy way to adapt. In particular, it is hard to measure the deviation of a line segment from the exact curve 11/19/02

Rendering Bezier Curves (2) Recall that a Bezier curve lies entirely within the convex hull of its control vertices If the control vertices are nearly collinear, then the convex hull is a good approximation to the curve Also, a cubic Bezier curve can be broken into two shorter cubic Bezier curves that exactly cover the original curve This suggests a rendering algorithm: Keep breaking the curve into sub-curves Stop when the control points of each sub-curve are nearly collinear Draw the control polygon - the polygon formed by the control points 11/19/02 (

B-Spline Curves B-Splines fix two major problems of Béziers: Global control of control points Relationship between degree of the curve and the number of control points This is achieved by letting the user specify any number of control points and automatically constructing a set of cubic curves that are C2 This is similar to a set of joined cubic Bézier curves Joined cubic Bézier curves can have any number of control points and are still cubic, and each control point only influences its local cubic curve But B-Splines are C2 and have no constraints on control point locations as joined cubic Bézier curves

B-Spline Cubics For B-Spline cubic curves, (basis splines) the coefficients aij are chosen for 3 properties between adjacent segments

B-Spline Cubics B-Spline cubic curves achieve C2 continuity by sacrificing the interpolation at the end points. In fact, with control points only a segment between is drawn as t varies between 0 and 1, though its shape is influenced by as well.

B-Spline Cubics Control Points P0, P1, P2, P3 t=1 t=0

B-Spline Cubics Control Points P0, P1, P2, P3 t=0 t=1 Effect of moving P3

B-Spline Cubics Control Points P1, P2, P3, P4 t=0 t=1 Effect of adding P4

B-Spline Cubics Control Points P0, P1, P2, P3, P4 The curve has C2 continuity at the join point P2

B-Splines - coefficients The 4x4 matrix coefficients are chosen to satisfy the above 3 properties:

B-Splines – Properties check continuity at the join of Q and : So, (property 1) – P1, P2, P3 weighted towards P2

B-Splines - coefficients Note: Differentiation of the powers of t gives:

B-Splines – Properties check continuity at the join of Q and : So, (property 2) – slope is in the direction joining P1 to P3

B-Splines – Properties check continuity at the join of Q and : So, (property 3) – acceleration is in the direction of (P3 – P2 ) – (P2 – P1 )

B-Spline Curves So just like with Bézier curves, we have control points (Pi) and blending functions (Bi(u)) However, a full B-Spline curve of M+1 control points is really made up of M-2 curve segments, each being controlled by 4 of the control points Also, the blending functions are defined differently than with Bézier curves, with the two most popular variations being: Uniform Non-Uniform

Uniform B-Spline Curves Uniform blending functions get their name from the fact that all the blending functions are uniform

Uniform B-Spline Curves Recall that each curve segment composing the full B-Spline needs 4 control points modified by 4 blending functions This implies that only the section in yellow on the previous slide can be used to define the curve At either end there are not enough blending functions This also implies that the curve will not go through any of the control points, including the first and last (as was the case with Bézier) There are multiple non-zero blending functions at t=0 and t=1

Rational Curves A rational curve is a curve defined in 4D space that is then projected into 3D space The main point of using rational curves is that it allows you to define weights on the control points Giving a control point a higher weight causes the curve to be pulled more towards that control point One can have Rational Bézier curves or Rational B-Spline curves Or other types of curves not covered (Hermite, etc.)

Parametric Patches Parametric patches are used to model smooth curved surfaces and to allow dynamic control over the shape of the surface Parametric patches are uses heavily in CAD application and animation Currently real-time applications are dominated by triangle meshes Patches hold many advantages over triangle meshes and if hardware support for them becomes widespread there could be a major shift to them

Rendering Patches To have proper lighting we also need normals for the triangles We can simply use the triangles normal Or, if we want to be more accurate, we can use the actual normal to the parametric surface Partial derivative in the u direction is 1st tangent Partial derivative in the v direction is 2nd tangent Take their cross product and normalize to produce the normal vector

Parametric Patches One of the first uses of parametric patches is the “Utah Teapot” The actual teapot is on the left

Polygonal Representation

Polygonal Representation http://commons.wikimedia.org/wiki/Category:Utah_teapot

Rendered http://commons.wikimedia.org/wiki/Category:Utah_teapot

Patches To represent a surface, the concept of “curve” needs to be generalised. We can construct a sequence of slowly changing curves, each displaced from the previous one in a 3D setting.

Patches In terms of the present work, we can construct a curve from its control points. To generate a surface, we place side by side the sequence of curves. Each curve in the sequence will have slightly different control points. We can arrange the displaced control points themselves to lie on a curve, itself generated from another set of control points!

Bézier Patches 1 patch, 4x4 controls Evaluation: coarse

Bézier Patches 1 patch, 4x4 controls Evaluation: fine

Bézier Patches

Bézier Patches

Bézier Patches

Bézier Patches

Bézier Patches

Bézier Patches The following is an example of the control point lattice:

Bézier Patches The surface that is created is based on the control points:

Bézier Patches The surface is based on Bézier curves Thus, the surface only matches the control points at the 4 corners

Bézier Patches Approach: for a single curve, make the control points Pi variable depend on another parameter, u in [0,1], say : Pi (u). In this way, obtain a new (displaced) curve for each u. Thus, for u=0, ¼, …1, ...

Bézier Patches Generally: Express the variability of itself as a Bézier curve: by introducing 4 control points for each control point function Pi (u),

Bézier Patches In total, we need 4x4 control points. We specify the control functions in matrix form:

Bézier Patches Thus: Now substitute the matrix expression for P0(u) .. P3(u) :

Bézier Patches Bézier Patches This has the form: T where

Bézier Patches An explicit form of is obtained by expressing in polynomial form: T 2 3 1 T u u 2 1 -1 -3 3 -6 u 3 where B =

Bézier Patches Thus T 1 T u 2 3 u 2 u 3

Bézier Polynomials For reference: T = =

Bézier Patches All the same issue occur with patches as with curves Adjusting the control points changes the shape of the surface: All the same issue occur with patches as with curves Control points have global control Increasing the number of control points will increase the degree of the patch

Bézier Patches Thus, we handle large curvy surfaces the same was as with curves: join patches together Recall the continuity constrains: C0 continuity: edges must match C1 continuity: colinear control points More difficult near joins of 4 patches

Midpoint Subdivision Repeatedly join midpoints to find new control vertices Do it first for each row of original control points: 4x4 -> 4x7 Then do it for each column of new control points:4x7 -> 7x7

A Potential Problem One (good) way to subdivide, is: If a control mesh is flat enough – draw it Else, subdivide into 4 sub-patches and recurse on each Problem: Neighbouring patches may not be subdivided to the same level Cracks can appear because join edges have different control meshes This can be fixed by adding extra edges Crack

Convex Hull property Ideally, we want the “weights” of to be between 0 and 1 sum to 1 Then the points will not lie outside the inter-joins of points , that is, be contained in their convex hull.

Convex Hull property P1 P2 P3 P0

Convex Hull property Convex hull of P0 P3 P1 P2 See this as 2D or 3D, as appropriate

Convex Hull property Holds for Bézier curves See Bézier Polynomials Holds for B-Splines Proved similarly.

B-Splines – outline sum of weights Note. From we also obtain:

B-Splines – outline sum of weights = = = 1

B-Spline Patches B-Spline patches are similar to Bézier patches except that they are based on B-Spline curves This implies that: You can have any number of control points in either the u or v direction (4x4, 8x12, etc.) and still maintain piecewise C2 cubic patches With Uniform patches, the patch is will no go through the control points

Rendering Patches There are two types of ways we can render patches: Render them directly from the parametric descriptions in hardware Must have hardware support Approximate the patch with a triangle mesh and render this mesh Usually done in software Standard pipeline can be used

Rendering Patches To approximate the patch with triangles, we can use a uniform subdivision Evaluate the surface at fixed (u,v) intervals and connect the points with triangle strips

Rendering Patches Or we can use an adaptive subdivision Pros: Cons: Divide surface in quarters If approximation patch is “flat enough” relative to the actual surface patch, then draw it Otherwise, repeat the sub-division on that quarter Pros: More triangles are generated where the curvature is high, less triangles where curvature is low Cons: Problems with cracks Neighbors not subdivided to the same level Can be fixed by adding more edges

How to Choose a Spline Hermite curves are good for single segments where you know the parametric derivative or want easy control of it Bezier curves are good for single segments or patches where a user controls the points B-splines are good for large continuous curves and surfaces NURBS are the most general, and are good when that generality is useful, or when conic sections must be accurately represented (CAD)