Documente Academic
Documente Profesional
Documente Cultură
91.580.201
Curves
Mortenson Chapter 2-5
and Angel Chapter 9
Curve Basics
Curve: Locus of a point moving with 1 degree of freedom.
Some types of equations to describe curves:
Intrinsic
No reliance on external frame of reference
Explicit
Value of dependent variable in terms of independent variable(s)
e.g. y = f (x)
Implicit
e.g. f (x,y) = 0
Parametric
Express value of each spatial variable in terms of an independent
variable (the parameter)
e.g. for parameter u in 3D:
x = x (u)
y = y (u)
z = z (u)
tangent
vector* Vector components of pu(u):
dx(u ) dy (u ) dz (u )
xu yu zu
du du du
vector
*unless otherwise noted, tangent vectors not drawn to scale. source: Mortenson
Parametric Form Advantages
Allow separation of variables and direct
computation of point coordinates.
Accommodate all slopes.
Bounded when parameter lies in a
bounded interval.
More degrees of freedom to control curve
shape.
Various forms of continuity can be
enforced at curve segment join points.
See Mortenson p.46 for more source: Mortenson
Continuity at Join Points
Discontinuous: physical separation
Parametric Continuity
Positional (C0 ): no physical separation
C1 : C0 and matching first derivatives
C2 : C1 and matching second
derivatives
Geometric Continuity
Positional (G0 ) = C0
Tangential (G1) : G0 and tangents are
proportional, point in same direction,
but magnitudes may differ
Curvature (G2) : G1 and tangent lengths
are the same and rate of length change
is the same
source: Angel
Hermite
Geometric form (cubic case):
F1 (u ) 2u 3 3u 2 1
F2 (u ) 2u 3 3u 2
F3 (u ) u 3 2u 2 u
F4 (u ) u 3 u 2
source: Mortenson
Bezier
Geometric form (cubic case):
n
p(u) Bi ,n (u)pi
i 0
n
Bi ,n (u ) u i (1 u ) n i
i
Bernstein polynomials.
n+1 = number of control points = degree + 1
Adding a control point elevates degree by 1. n
Bi ,n (u ) 1
Bezier curves can provide C1 i 0
continuity at curve segment Convex combination, so Bezier curve points all lie
within convex hull of control polygon.
join points.
n
hi Bi ,n (u )p i
Rational form is invariant under perspective transformation: p(u ) i 0
n
where hi are projective space coordinates (weights)
hi Bi ,n (u )
i 0
source: Mortenson
B-Spline
Geometric form (non-uniform, n
p(u ) Ni , K (u)pi
non-rational case), where K i 0
controls degree (K -1) of basis
functions: N
N N
N i ,1 (u ) 1 if ti u ti 1
N i ,1 (u ) 0 otherwise N N
N N
(u ti ) N i ,k 1 (u ) (ti k u) Ni 1, k 1 (u )
N i ,k (u ) N N
ti k 1 ti ti k ti 1
continuity at curve segment join Convex combination, so B-spline curve points all
lie within convex hull of control polygon.
points. n
hi N i , K (u )p i
Rational form (NURBS) is invariant under perspective p(u ) i 0
n
transformation, where hi are projective space coordinates hi N i , K (u )
(weights). i 0
source: Mortenson
Geometric Modeling
91.580.201
OpenGL Demo
to accompany HW#2