DOC PREVIEW
Princeton COS 426 - Curves

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

11CurvesAdam FinkelsteinPrinceton UniversityC0S 426, Fall 20012Introduction• Splines: mathematical way to express curves• Motivated by “loftsman’s spline”o Long, narrow strip of wood/plastico Used to fit curves through specified data pointso Shaped by lead weights called “ducks”o Gives curves that are “smooth” or “fair”• Have been used to design:o Automobileso Ship hullso Aircraft fuselages and wings3Many applications in graphics• Fonts ABC• Animation paths• Shape modeling•etc…Animation(Angel, Plate 1)Shell(Douglas Turnbull,CS 426, Fall99)4Goals• Some attributes we might like to have:o Predictable controlo Multiple valueso Local controlo Versatilityo Continuity• We’ll satisfy these goals using:o Piecewiseo Parametrico Polynomials5Parametric curvesA parametric curve in the plane is expressed as:x=x(u)y=y(u)Example: a circle with radius r centered at origin:x=rcos uy=rsin uIn contrast, an implicit representation is:x2+y2=r26Parametric polynomial curves• A parametric polynomial curve is described:• Advantages of polynomial curveso Easy to computeo Infinitely differentiable∑==niiiuaux0)(∑==niiiubuy0)(27Piecewise parametric polynomials• Use different polynomial functionson different parts of the curveo Provides flexibilityo How do you guarantee smoothness at “joints”?(continuity)• In the rest of this lecture, we’ll look at:o Bézier curves: general class of polynomial curveso Splines: ways of putting these curves together8Bézier curves• Developed simultaneously in 1960 byo Bézier (at Renault)o deCasteljau (at Citroen)•CurveQ(u) is defined by nested interpolation:Vi’s are control points{V0, V1,…,Vn}iscontrol polygonV0V1V2V3Q(u)9Basic properties of Bézier curves• Endpoint interpolation:• Convex hull:o Curve is contained within convex hull of control polygon•Symmetry0)0( VQ =nVQ =)1(},...,{bydefined)1(},...,{bydefined)(00VVuQVVuQnn−≡10Explicit formulation• Let’s indicate level of nesting with superscript j:• An explicit formulation ofQ(u) is given by:•Casen=2:111)1(−+−+−=jijijiuVVuV0220100202010100111020)1(2)1(])1[(])1)[(1()1()(VuVuuVuuVVuuuVVuuuVVuVuQ+−+−=+−++−−=+−==11More properties• General case: Bernstein polynomials• Degree: is a polynomial of degree n• Tangents:)()1(')()0('101−−=−=nnVVnQVVnQininiiuuinVuQ−=−=∑)1()(012Cubic curves• From now on, let’s talk about cubic curves (n=3)• In CAGD, higher-order curves are often used• In graphics, piecewise cubic curves will do ito Specify points and tangentso Will describe curve in space• All these ideas generalize to higher-order curves313Matrix form• Bézier curves can also be described in matrix form:()−−−−=+−+−+−=−=−=∑32102333221203000010033036313311)1(3)1(3)1()1()(VVVVuuuVuVuuVuuVuuuinVuQininiiMBezier14DisplayQ: How would you draw it using line segments?A: Recursive subdivision!V0V1V2V315Display• Here is pseudocode for displaying Bézier curves:procedure Display({Vi}):if {Vi} flat within εthenoutput line segment V0Vnelsesubdivide to produce {Li}and{Ri}Display({Li})Display({Ri})end ifend procedure16FlatnessQ: How do you test for flatness?A: Compare the length of the control polygonto the length of the segment between endpointsε+<−−+−+−1||||||||03231201VVVVVVVVV0V1V2V317Splines• For more complex curves, piece together Béziers• We want continuity across joints:o Positional (C0) continuityo Derivative (C1) continuity• Q: How would you satisfy continuity constraints?• Q: Why not just use higher-order Bézier curves?• A: Splines have several of advantages:• Numerically more stable• Easier to compute• Fewer bumps and wiggles18Catmull-Rom splines• Propertieso Interpolate control pointso Have C0and C1continuity• Derivationo Start with joints to interpolateo Build cubic Bézier between each jointo Endpoints of Bézier curves are obvious• What should we do for the otherBézier control points?419Catmull-Rom Splines• Catmull & Rom use:o half the magnitude of the vector between adjacent CP’s• Many other formulations work, for example:o Use an arbitrary constant τ timesthisvectoro Gives a “tension” controlo Could be adjusted for each joint20Matrix formulation• Express conversion from Catmull-Rom CP’sto Bezier CP’s with a matrix:• Exercise: Derive this matrix.−−=32103210060016100161006061VVVVBBBB21Properties• Catmull-Rom splines have these attributes:o C1 continuityo Interpolationo Locality of controlo No convex hull property(Proof left as an exercise.)22B-splines• We still want local control• Now we want C2continuity• Give up interpolation• It turns out we get convex hull property• Constraints:o Three continuity conditions at each joint j» Position of two curves same» Derivative of two curves same» Second derivatives sameo Local control» Each joint affected by small set of (4) CP23Matrix formulation for B-splines• Grind through some messy math to get:()−−−−=3210230141030303631331611)(VVVVuuuuQ24What’s next?• Use curves to create parameterized surfaces• Surface of revolution• Swept surfaces• Surface patchesDemetri TerzopoulosPrzemyslaw


View Full Document

Princeton COS 426 - Curves

Documents in this Course
Lecture

Lecture

35 pages

Lecture

Lecture

80 pages

Boids

Boids

25 pages

Exam 1

Exam 1

9 pages

Lecture

Lecture

83 pages

Load more
Download Curves
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Curves and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Curves 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?