35 views

Uploaded by SiavashB

save

- MicroESystems_Mercury1500V_DataSheet
- The Mathematical Language of Quantum Theory
- Survey Interpolation Methods in Medical Image Processing
- DC_GI98
- Lecture2 Interpolaticsdson
- vectfuncdef
- RigNotes15.pdf
- LinAlgSolutions
- 5 Nu Mint
- Frag Blast 8
- 01 Interpolation
- Lec-44 an Overview of Geometric Modeling
- Knowledge Base - Why Do I Get an _insufficient Memory to Perform Operation_ Error When Gridding Data
- Tesi a.dmytriv
- Maths1a Examples Alg Vecspace
- nota math
- Math Syllabus
- Application of Finite Symmetru
- w 3 Exercise
- P1 - Midterm 1
- Discrete Fourier Transform.pdf
- From the Matrix of Violence to the Matrix of Life
- Interpolation
- me471_lec02
- 19870014536_1987014536
- APPROXIMATE COMPUTATION OF ZERO-DIMENSIONAL POLYNOMIAL IDEALS (2009)
- JIM 211-Intensive Course - 2017 PDF
- logdet
- Lll
- Rask 2004
- Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
- Dispatches from Pluto: Lost and Found in the Mississippi Delta
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Sapiens: A Brief History of Humankind
- Yes Please
- The Unwinding: An Inner History of the New America
- This Changes Everything: Capitalism vs. The Climate
- Grand Pursuit: The Story of Economic Genius
- A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
- The Emperor of All Maladies: A Biography of Cancer
- The Prize: The Epic Quest for Oil, Money & Power
- John Adams
- Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
- The World Is Flat 3.0: A Brief History of the Twenty-first Century
- Rise of ISIS: A Threat We Can't Ignore
- The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
- Smart People Should Build Things: How to Restore Our Culture of Achievement, Build a Path for Entrepreneurs, and Create New Jobs in America
- Team of Rivals: The Political Genius of Abraham Lincoln
- The New Confessions of an Economic Hit Man
- How To Win Friends and Influence People
- Steve Jobs
- Angela's Ashes: A Memoir
- Bad Feminist: Essays
- You Too Can Have a Body Like Mine: A Novel
- The Incarnations: A Novel
- The Light Between Oceans: A Novel
- Leaving Berlin: A Novel
- The Silver Linings Playbook: A Novel
- The Sympathizer: A Novel (Pulitzer Prize for Fiction)
- Extremely Loud and Incredibly Close: A Novel
- A Man Called Ove: A Novel
- The Master
- Bel Canto
- We Are Not Ourselves: A Novel
- The First Bad Man: A Novel
- The Rosie Project: A Novel
- The Blazing World: A Novel
- The Flamethrowers: A Novel
- Brooklyn: A Novel
- Life of Pi
- The Love Affairs of Nathaniel P.: A Novel
- The Bonfire of the Vanities: A Novel
- Lovers at the Chameleon Club, Paris 1932: A Novel
- The Perks of Being a Wallflower
- My Sister's Keeper: A Novel
- A Prayer for Owen Meany: A Novel
- The Cider House Rules
- Wolf Hall: A Novel
- The Art of Racing in the Rain: A Novel
- The Wallcreeper
- Interpreter of Maladies
- The Kitchen House: A Novel
- Beautiful Ruins: A Novel

You are on page 1of 26

Stu Pomerantz

smp@psc.edu

http://www.psc.edu/~smp

December 8, 2004

**a Mostmaterial is adapted from: OpenGL ARB, et. al, “The OpenGL Pro-
**

gramming Guide”, Third Ed., Reading: Addison-Wesley, 1999

1

2D Parametric Curves

In two dimensions a parametric curve is defined by:

x = x(u)

y = y(u)

Where u is the parameter that is free to vary. For example:

x = cos(θ)

y = sin(θ)

x and y will trace out a circle as 0 ≤ θ ≤ 2π .

222

2D Parametric Curves Drawing of the parametric circle: 223 .

u < 8*PI . } glEnd() . u += du) { x = cos(u) . du = PI/32 . y = sin(u) . z = 0 .z) .z) .y. glVertex3f(x. y = sin(u+du) . 224 . z = 0 . x = cos(u+du) . for( u = 0 . glVertex3f(x. 2D Parametric Curves Code for the parametric circle: glBegin(GL_LINES) .y.

y and z will trace out a circlular helix as 0 ≤ θ ≤ 2π . 3D Parametric Curves In two dimensions a parametric curve is defined by: x = x(u) y = y(u) z = z(u) Where u is the parameter that is free to vary. 225 . For example: x = cos(θ) y = sin(θ) z=θ x.

3D Parametric Curves Drawing of the parametric helix: 226 .

z) .y. x = cos(u+du) .y. } glEnd() . glVertex3f(x. u += du) { x = cos(u) . for( u = 0 . 227 . y = sin(u) . 3D Parametric Curves Code for the parametric helix: glBegin(GL_LINES) . z = u . glVertex3f(x.z) . z = u+du . du = PI/32 . u < 8*PI . y = sin(u+du) .

228 . v) y = y(u. 3D Parametric Surfaces In three dimensions a parametric surface is defined by: x = x(u. y and z will trace out a sphere as 0 ≤ θ ≤ 2π and 0 ≤ φ ≤ 2π . v) Where u and v are the parameters that are free to vary. For example: x = cos(θ) sin(φ) y = sin(θ) sin(φ) z = cos(φ) x. v) z = z(u.

3D Parametric Surfaces Drawing of the parametric sphere: 229 .

Polynomial Parametric Curves n X p~(u) = uk~c k k=0 where cxk k ~c = cyk czk 230 .

3 X p~(u) = uk~c k k=0 expands to: cx3 cx2 cx1 cx0 3 2 + u cy2 + u cy1 + cy0 p~(u) = u cy3 cz3 cz2 cz1 cz0 231 . Polynomial Parametric Curves For example if n = 3.

cx3 cx2 cx1 cx0 3 2 p~(u) = u cy3 + u cy2 + u cy1 + cy0 cz3 cz2 cz1 cz0 expands to x(u) = cx3 u3 + cx2 u2 + cx1 u + cx0 p~(u) = y(u) = cy3 u3 + cy2 u2 + cy1 u + cy0 z(u) = cz3 u3 + cz2 u2 + cz1 u + cz0 Notice that 4 coefficient vectors which must be specified. 232 . Polynomial Parametric Curves Continuing.

• Generally. v) n X m X i j p~(u. and u and v for surfaces have an infinite domain. only an interval of values for the domain of u and v is desired. if n = m = 3 then 16 coefficient vectors will be needed to evaluate the formula and determine the value of p~ • u for curves. 233 . 1]. though. v) So. restrict the range of u and v to [0. without lost of generality. • So. v) = ~ c ij u v i=0 j=0 z(u. Polynomial Parametric Surfaces x(u. v) = y(u.

p~0 and p~1 . The points p~0 and p~1 can be thought of as control points since they influence (constrain) the final interpolated value. can be linearly interpolated like this: p~ = a p~0 + (1 − a) p~1 where a ∈ [0. interpolation is also called blending. but not identical to. Interpolation Revisited Two points. And. The points are mixed together by the a and 1 − a which are weights. OpenGL’s blending functions. This is similar. in this case the purpose is not to produce transparent surfaces but rather to produce a new interpolated point. 234 . 1] In this context.

235 . Rewrite this equation. Interpolation using Cubic Polynomials Recall the cubic polynomial 3 X p~(u) = uk~c k k=0 Requires 4 vectors of coefficients in order for it to be completely determined...

using a matrix representation of the coefficient vectors. p~(u) = U · M · G Call M the basis matrix. 236 .. Interpolation using Cubic Polynomials . p~(u) = [x(u) y(u) z(u)] = m11 m12 m13 m14 g1x g1y g1z m21 m22 m23 m24 ¤ g g2y g2z £ 3 2 2x u u u 1 · · m31 m32 m33 m34 g3x g3y g3z m41 m42 m43 m44 g4x g4y g4z Or more briefly. Call G the Geometry matrix.

Interpolation using Cubic Polynomials For example. 237 . x(u) = (u3 m11 + u2 m21 + um31 + m41 )g1x + (u3 m12 + u2 m22 + um32 + m42 )g2x + (u3 m13 + u2 m23 + um33 + m43 )g3x + (u3 m14 + u2 m24 + um34 + m44 )g4x + This form emphasizes that the curve is a weighted sum of the elements of G (geometry) matrix.

238 . They are called control points. • The meaning of these 4 points is dependant on the basis matrix M. • The basis matrix M affects – The continuity of the curve. – Which and whether control points are interpolated. contains 4 points. G. • Analogous to the 2 control points in the previous linear interpolation example. Interpolation using Cubic Polynomials • The geometry matrix.

The construction the Hermite basis matrix is as follows: Given 4 control points: p~1 . p~4 • Constrain the curve so that it interpolates p~1 at u = 0 and p~4 at u = 1 • Let p~2 and p~3 be the tangent vectors for p~1 and p~4 respectively. p~2 . 239 . p~3 . The Hermite Basis The Hermite basis is named after the Mathematician.

The Hermite Basis Recall. 0 £ 2 ¤ U = 3u 2u 1 0 There are 4 equations and 4 unknowns: p~1 = [0 0 0 1] (u = 0) p~4 = [1 1 1 1] (u = 1) p~2 = [0 0 1 0] (u0 = 0) p~3 = [3 2 1 0] (u0 = 1) 240 . £ 3 2 ¤ U= u u u1 so.

The Hermite Basis Rewriting the 4 equations above as a matrix: p~1 0 0 0 1 p~ 1 1 1 1 4 = p~2 0 0 1 0 p~3 3 2 1 0 For these equations to be satisfied M . the Hermitian basis matrix must be the inverse of this matrix. 241 .

(2u3 − 3u2 + 1)~ p1 + (−2u3 + 3u2 )~ p4 + p~(u) = (u3 − 2u2 + u)~ p3 + (u3 − u2 )~ p4 242 . The Hermite Basis The Hermitian basis matrix: 2 −2 1 1 −3 3 −2 −1 M = 0 0 1 0 1 0 0 0 So.

The Hermite Basis A picture of the Hermitian basis functions: 243 .

Example Hermite Curves 244 .

Hermite Bezier Non-Uniform B-Spline Catmull-Rom A Y Y N Y B Y N N Y C C0 C0 C2 C1 A = Interpolates some control points B = Interpolates all control points C = Inherent Continuity If the direction and magnitude of the nth derivative are equal at the joint point. 245 . Comparison of Curve Types Curves differ by basis matrix. the curve is called C n continuous.

Example NURBS Surface 246 .

- MicroESystems_Mercury1500V_DataSheetUploaded byElectromate
- The Mathematical Language of Quantum TheoryUploaded bySeventh Seal
- Survey Interpolation Methods in Medical Image ProcessingUploaded byCamila Cediel
- DC_GI98Uploaded byjmckin_2010
- Lecture2 InterpolaticsdsonUploaded byChristian Gerald Daniel
- vectfuncdefUploaded byStelios Kondos
- RigNotes15.pdfUploaded byWazzupWorld
- LinAlgSolutionsUploaded bynuruhli
- 5 Nu MintUploaded byPallab Sarkar
- Frag Blast 8Uploaded bysukhoi200900
- 01 InterpolationUploaded byDarwin Lim
- Lec-44 an Overview of Geometric ModelingUploaded byElango
- Knowledge Base - Why Do I Get an _insufficient Memory to Perform Operation_ Error When Gridding DataUploaded byPritam Jadhav
- Tesi a.dmytrivUploaded byPipino Il Breve
- Maths1a Examples Alg VecspaceUploaded bytutisarmiento1
- nota mathUploaded byNurFatih
- Math SyllabusUploaded byraki_sg
- Application of Finite SymmetruUploaded byEnrico W. Febriardy
- w 3 ExerciseUploaded bymohamad_bidari
- P1 - Midterm 1Uploaded byshahzaiblatafat12
- Discrete Fourier Transform.pdfUploaded byKaran Saini
- From the Matrix of Violence to the Matrix of LifeUploaded byMonika Berghoff
- InterpolationUploaded bykavetis
- me471_lec02Uploaded byHasen Bebba
- 19870014536_1987014536Uploaded bydrig1234
- APPROXIMATE COMPUTATION OF ZERO-DIMENSIONAL POLYNOMIAL IDEALS (2009)Uploaded bySebastian Pokutta
- JIM 211-Intensive Course - 2017 PDFUploaded bymareasantha
- logdetUploaded bypm100
- LllUploaded bykr0465
- Rask 2004Uploaded byMohammadGh