EECS$487:$Interactive$ Computer$Graphics$: Extruded/Swept$Surfaces$
EECS$487:$Interactive$ Computer$Graphics$: Extruded/Swept$Surfaces$
EECS$487:$Interactive$ Computer$Graphics$: Extruded/Swept$Surfaces$
Consider$a$curve$in$space$as$being$swept$out$
EECS$487:$Interactive$ by$a$moving$point:$p(u) = [x(u) y(u) z(u)]T!
as$we$vary$u$the$point$moves$through$space$
Computer$Graphics$ the$curve$is$the$path$taken$by$the$point$
$
Similarly$we$can$think$of$a$surface:$
Lecture$37:$Parametric$surfaces$ s(u, t) = [x(u, t) y(u, t) z(u, t)]T$
Swept$surfaces$ as$being$swept$out$by$a$prole$curve$
Geometric$continuity$ along$a$trajectory$curve$
the$set$of$points$visited$by$the$curve$
Bzier$curves$and$patches$
during$its$motion$denes$the$surface$
Yu,Terzopoulos$
General$Sweep$Surfaces$ Extruded/Swept$Surfaces$
Trajectory$path$may$be$any$arbitrary$curve$ Dierent$prole$curves,$
The$prole$curve$may$be$transformed$ same$trajectory$curve$
as$it$moves$along$the$path$
scaled,$rotated$with$respect$to$path$orientation,$$
Example:$surface$s(u, t) is$formed$by$a$prole$
curve$in$the$xyPplane$p(u) = [x(u) y(u) 0 1] T
extruded$along$the$zPaxis:$
s(u, t): T(t)p(u):$
x(u, t) = x(u), y(u, t) = y(u), 0 u 1, !
z(u, t) = t, zmin t zmax
Fussell,Durand,Terzopoulos$ Schulze$
Surfaces$of$Revolution$ A$Banana$as$a$Generalized$Cylinder$
Use$rotation$around$an$ What$we$specify$
axis$instead$of$translation$ a$mostly$circular$prole$
along$a$path$ a$spine$for$the$banana$
or,$extrusion$where$the$ a$scaling$function$
trajectory$curve$is$a$circle
cross$section $scaling$function$
s(u, t): R(t)p(u)$
Periodically$along$the$spine$
place$a$cross$section$
scale$it$appropriately$
connect$to$previous$section$
Schulze,Durand$ Yu,Snyder$
General$Sweep$Surfaces$ General$Sweep$Surfaces$
For$every$point$along$q(t),$lay$p(u)$so$that$op!coincides$
The$trajectory$curve$is$like$a$spine$
with$q(t)$
sweeping$the$prole$curve$skins$a$surface$around$the$
trajectory$curve$ $ q(t) q(t)
the$shape$of$the$spine$controls$the$shape$of$the$object$
$ p(u) s(u, t)
nice$for$animation:$
dont$have$to$control$the$surface$
$ op
just$reshape$the$spine$and$the$surface$follows$along$ $ op
p(u)
$
This$gives$us$locations$along$q(t),$how$about$orientation?$
1. xed$or$static:$aligns$p(u)$with$an$axis$
2. allows$smoothly$varying$orientation$that$follows$the$
orientation$of$q(t):$use$the$Frenet$frame$of$q(t)$
Yu,Chenney,Terzopoulos$ Curless$
Dierential$Geometry$of$Curves$ Arc$Length$Parameterization$
Uses:$ For$smooth$motion,$we$want$continuous$1st$and$2nd$
dene$orientation$of$swept$surfaces$ derivatives$with$respect$to$time$dq/dt!
compute$velocity$of$animation$
compute$normals$of$surfaces$ But$to$describe$shape,$we$could$ask$for$continuity$with$
analyze$smoothness/continuity$ respect$to$equal$steps$(arc$length):$dq/ds!
Tangent:$ q(t)
The$velocity$of$movement,$1st$derivative$with$respect$to$t!
q(s)
q(t) = (x(t), y(t), z(t))$or$q(t) (q(t+t) q(t))/t!
||q(t)||$is$the$speed$of$movement$
normalized$tangent$t(t) = q(t)/||q(t)||$is$the$direction$of$movement$
the$numeric$form$of$forward$dierence$is$useful$if$q(t)$is$a$black$box$
The$tangent$provides$us$with$the$rst$of$three$
orientations$for$swept$surfaces$
Durand$ TP3,$Hart$
Arc$Length$Parameterization$ Arc$Length$Travelled$
Arc$length$parameterization:$equal$steps$in$parameter$ Arc$length$travelled$along$a$curve$can$be$computed$
space$s$maps$to$equal$distances$along$the$curve$ by$integrating$speed$of$movement$along$curve:$
usually$
intrinsic$to$the$shape:$arises$naturally$from$the$shape$of$the$ t t
cannot$be$
curve$and$does$not$depend$on$any$particular$coordinate$system$ s(t) = q '( ) d = x '( !)2 + y'( )2 + z '( )2 d evaluated$
0 0 analytically$
!
If$s$is$the$length$of$curve$from$q(0)$to$q(t),$q(s) can$be$
expressed$in$terms$of$t:$q(s) = {q(t): s(t) = s},$e.g.,$$ So$arc$length$travelled$is$not$necessarily$proportional$
to$passing$time:$$
i.e.,$equal$steps$in$time$(t)$does$not$necessarily$
q(t) give$equal$distances$in$arc$length$(s)$
q(s) q(t)
q(s)
t = 0, s = s(0) = 0!
t = 1, s = s(1) = curve$length$
TP3,$Hart,$Curless$ TP3,$Hart$
Arc$Length$by$Linear$Interpolation$ Curvature$and$Normal$
Curvature:$derivative$of$tangent$
RePparameterization$by$arc$length$(q(s) = q(t(s)))$
with$respect$to$arc$length$(dt(s)/ds)$
may$not$be$easy$or$possible$for$every$curve$function:$$ how$fast$the$curve$pulls$away$
from$a$straight$line$
instead,$prePcompute$a$set$of$variable$
always$orthogonal$to$tangent$ low$curvature$
arc$lengths$si$for$points$on$the$curve$ constant$for$a$circle$
using$t$parameterization$ zero$for$a$straight$line$
$
to$nd$the$corresponding$point$(pk)$
Normal:$normalized$curvature$
on$the$curve$for$a$given$sk,$linearly$ vector$points$to$the$
interpolate$the$points$of$the$2$ center$of$curvature$
nearest$arc$lengths$si$and$si+1,$ the$2nd$of$3$orientations$
where$si sk si+1:$ for$swept$surfaces$
si+1 sk s s
pk = p + k i p
si+1 si i si+1 si i+1
TP3$ high$curvature$
Durand$
Torsion$and$Binormal$ Frenet$Frame$
Torsion:$deviation$of$the$curve$ Given$a$curve q(t)$we$can$attach$a$smoothly$varying$
from$the$plane$formed$by$the$ coordinate$system$consisting$of$three$basis$vectors$
tangent$and$normal$vectors$ (reparameterized$to$arc$length):$
zero$for$a$plane$curve$
tangent:$t(s) = q(s)$(unit$length$by$denition)$
binormal$vector$points$to$the$winding$
normal:$n(s) = t(s)/||t(s)||$
direction$of$the$space$curve$
binormal:$b(s) = tt /||tt||$(= nt)$ q(t)
the$3rd$of$3$orientations$for$swept$surfaces$ q(s)
Due$to$Jean$Frdric$Frenet$(1847)$
A$curve$is$a$1D$manifold$in$a$space$of$higher$dimension$ and$Joseph$Alfred$Serret$(1851)$ q(s)
$
Plane$(2D)$curves,$described$by:$
position,$tangent,$curvature$
As$we$move$along$q(t),$the$Frenet$
frame$(t(s),$b(s),$n(s))$varies$smoothly$ osculating$plane$
Space/skew$(3D)$curves,$described$by:$ formed$by$n$and$t!
position,$tangent,$curvature,$torsion $ normal$plane$
formed$by$n$and$b!
Bchet$ Curless$
Frenet$Swept$Surfaces$ Variations$
Orient$the$prole$curve p(u)$using$ Several$variations$are$possible:$
the$Frenet$frame$of$the$trajectory$q(t)$ scale$p(u)$as$it$moves,$
possibly$scaled$to$||q(t)||$
put$p(u)$in$the$normal$plane$of$q(t)$
q(t) morph$p(u)$into$some$other$curve$
place$op$on$q(t)$
f(u)$as$it$moves$along$q(t)$
align$px(u)$with$b!
align$py(u)$with$n! op
px(u)
p(u) py(u)
n
b
t
q q(t)
If$q(t)$is$a$circle,$you$get$a$surface$of$revolution$exactly!$
p(u)
Curless,wikipedia$ Curless,Funkhouser$
Problems$with$Swept$Surfaces$ FreePform$Surfaces$
What$happens$at$inection$points?$ Swept$surfaces$are$great,$but$we$would$
curvature$goes$to$zero$ like$to$represent$freePform$(asymmetric,$
then$normal$ips!$
irregular)$curves$and$surfaces$
resulting$in$a$nonPsmooth$swept$surface$
$
We$would$also$like$to$give$model$builders$
an$intuitive$control$of$a$smooth$shape$
can$specify$objects$with$a$few$control$points$
resulting$object$is$visually$pleasing$(smooth)$
Also,$dicult$to$avoid$selfPintersection$
Curless,Fussell,Durand,Chenney$ Schulze$
Parametric$Patches$
Polynomial$Surfaces$
Parametric$curves$and$surfaces$give$and$require$
CAGD$(ComputerPAided$Geometric$Design):$ fewer$degrees$of$control$than$polygonal$meshes$
area$of$CG$dealing$with$freePform$shapes$ users$control$a$few$points$
program$smoothly$lls$in$the$rest$
$ representation$provides$analytical$
1960s:$ expressions$for$normals,$tangents,$etc.$
the$need$for$mathematical$representations$of$freePform$
shapes$became$apparent$in$the$automotive$and$ Surface$is$partitioned$into$patches:$
aeronautic$industries$ piecewise$parametric$surfaces$(3D$splines)$
Paul$de$Casteljau$&$Pierre$Bzier$independently$
each$dened$by$control$points$forming$
developed$the$theory$of$polynomial$curves$&$surfaces$$ a$control$mesh$
which$became$the$basic$tool$for$describing$and$rendering$ Most$popular$for$modeling$are$
freePform$shapes$
Bzier,$BPsplines,$and$NURBS$
well$study$these$as$2D$splines$rst,$
then$well$use$them$as$3D$patches$ Funkhouser,$FvDFH$Fig.$11.44!
TP3$
Measures$of$Joint$ y (t )
y(u)! Join point
C2
Joint$Smoothness$
Smoothness$ S C00
C
1
CC1
C2 C 0$continuous$
curve/surface$has$no$breaks/gaps/holes$
Parametric$continuity:$
model$is$watertight$
continuous$by$parameter$u!
x(u)!
x(t )
useful$for$trajectories$ Foley,$van$Dam$92$
C 1$continuous$
0th$order,$C 0"
curve$segments$meet$(join$point):$f2(0) = f1(1)! model$looks$smooth,$no$
1st$order,$C1" facets$(but$sometimes$
1st$derivatives,$velocities,$are$equal$at$join$point:$f 2(0) = f1(1)! looks$like$a$lumpy$potato)$
2nd$order,$C 2"
2nd$derivatives,$accelerations,$are$equal$at$join$point$ C 2$continuous$
looks$more$polished:$
C0 !C 1 !C 2
smooth$specular$highlights$
2nd$order,$G 2!
TV2
G1
2nd$derivatives,$curvatures,$ C2 G2
Q3
are$proportional$at$join$point$ P1
P3
P2 C1 Q
Gn$continuity$is$usually$a$weaker$constraint$than$Cn continuity$ Q1
2
$(e.g.,$the$speed$along$the$curve$does$not$matter)$ x(u)!
x(t )
$
But$neither$form$of$continuity$is$guaranteed$by$the$other$
Shirley,Marschner$ Rockwood$et$al.,$Marschner,$FvD$
C1$not$G1! Cubic$Splines$
When$the$curve$p(t)$goes$
to$zero,$velocity$changes$ A$representation$of$cubic$spline$consists$of:$
direction,$and$starts$again$ four$control$points$(why$four?)$
these$are$completely$user$specied$
determine$a$set$of$blending$functions$
$
There$is$no$single$best$representation$of$cubic$spline:$
$
Cubic$ Interpolate?$ Local?$ Continuity$ Ane?$ Convex*?$ VD*?$
$
Hermite$ $ $ C1! $ n/a$ n/a$
$
Cardinal$ $except$ $ C1! $ no$ no$
$ (CatmullPRom)$ endpoints$
$ Bzier$ endpoints$ $ C1! $ $ $
$
natural$ $ $ C 2! $ n/a$ n/a$
$
p(t) $ BPsplines$ $ $ C 2! $ $ $
*$n/a$when$some$of$the$control$points$are$tangents,$not$points$
Rockwood$et$al.,$Marschner$
Bzier$Curve$ Bzier$Curve$ p1
Shirley$
Uses$an$arbitrary$number$of$$
p2
Named$after$Pierre$Bzier,$$
p0
control$points$(not$just$cubic)$
p1-
p3
a$car$designer$at$Renault$
-p
2
$ the$rst$and$last$control$points$
f(0)=3(p1-p0)
p3
interpolate$the$curve$
p0 f(1)=3(p3-p2)
Independently$developed$by$ cubic$
Paul$de$Casteljau$at$Citron$ the$rest$approximate$the$curve,$control$point$i$exerts$the$
$ strongest$attraction$at$u = i/n, 1 i < n1, 0 u 1!
Has$an$intuitive$geometric$feel,$ tangent$at$the$start$of$the$curve$is$proportional$to$
easy$to$control$ the$vector$between$the$rst$and$second$control$points$
common$interface$for$creating$curves$in$ Watt$ tangent$at$the$end$of$the$curve$is$proportional$to$the$
drawing$programs$
used$in$font$design$(Postscript)$ vector$between$the$second$last$and$last$control$points$
the$nPth$derivative$at$the$start$(end)$of$the$curve$depends$
Foley$&$van$Dam$ on$the$rst$(last)$n+1$control$points!
Quadratic$Bzier$Curve$ Variation$Diminishing$Property$
p2
A$quadratic$Bzier$curve$has$3$control$points$ p2
Control$graph$(not$convex$hull):$ p 0 p p 3
Example:$compute$f(u = 4/5)!
0
Shirley$
Variation$Diminishing$Property$ de$Casteljau$Algorithm$
Bzier$curves$have$the$variation$diminishing$property$ A$geometric$evaluation$scheme$for$Bzier$
Various$Bzier$curves,$of$degrees$2-6:$ Connecting$the$control$points$into$a$control$graph$
$ results$in$a$curve$with$sharp$corners$(nonPsmooth)$
$ Smooth$out$this$curve$by$repeatedly$cutting$o$
$ the$sharp$corners$
$ subdivision$scheme:$a$process$of$breaking$a$curve$into$
$ smaller$pieces$
$ the$resulting$limit$curve$will$be$piecewise$smooth$
$
$
A$Bzier$curve$is$bounded$by$the$convex$hull$of$its$
control$points$
Shirley$
de$Casteljau$Algorithm$ de$Casteljau$Quadratic$Example$
u!
de$Casteljau$algorithm$creates$ Let!u = 1 2
1u! 1u!
Bzier$curve$recursively:$ u! 1u!
q 0 = 12 ( 12 p 0 + 12 p1 ) + 12 ( 12 p1 + 12 p 2 )
u! 1u!
u!
connect$every$adjacent$set$of$control$ u!
Or!more!generally:
1u! u!
points$with$straight$lines$
f (u) = (1 u)((1 u)p 0 + up1 ) + u((1 u)p1 + up 2 )
create$the$u$interpolate$points,$
u$$[0,1],$on$these$lines$$ cubic$ which!is!the!quadratic!Bzier!curve:
at$each$iteration,$there$are$n-1$such$points$
!f (u) = (1 u) p 0 + 2u(1 u)p1 + u p 2
2 2 p1
1-u!
connect$the$new$points$with$straight$lines$
repeat$until$only$one$new$point$is$created$
q0
p0 quadratic$ p2
de$Casteljau$Cubic$Example$ Cubic$Bzier$Curve$
Given$four$control$points$p0, p1, p2, p3,$use$
Control$points$consist$of$endpoint$interpolations$and$
de$Casteljau$algorithm$to$build$a$cubic$Bzier$curve$
derivatives:$
f(u), 0 u 1,$with$p0 = f(0), p3 = f(1)$as$shown:$
f (u) = a 0 + u1a1 + !!!!u 2 a 2 + !!!!u 3a 3
q1!
u! 1u!
p21 p2 p 0 = f (0)! = a 0 + 01 a1 + !!!!0 2 a 2 + !!!!0 3 a 3
3 2 3
q 0 = (1 u)p 0 + up1
r0!1u! u! 1u!u! r1!
q1 = (1 u)p1 + up 2 u! 1 0 0 0
3(p1 p 0 ) = f '(0) = !!!!!!!!!!!a1 + 2 * 01 a 2 + 3* 0 2 a 3
1u!
u!
f(u)! 1u! 1 13 0 0
q 2 = (1 u)p 2 + up 3 q0! q2! C=
r0 = (1 u)q 0 + uq1 u = ! $ p1 = 13 (a1 + 3a 0 ) = a 0 + 13 a1 + 0 2 a 2 + 0 3 a 3 1 23 1
3 0
u = !
3(p$ 3 p 2 ) = f '(1) = !!!!!!!!!!!a1 + 2 * !1 a 2 + 3*1 a 3
u! 1u! 1 1 1 1
r1 = (1 u)q1 + uq 2 u = !
1 2
f (u) = (1 u)r0 + ur1 p10 4p3 1 4
$
! p 3 = f (1)! = a 0 + !11 a1 + !!!!!12 a 2 + !!!!!13 a 3
f (u) = (1 u)3 p 0 + 3u(1 u)2 p1 + 3u 2 (1 u)p 2 + u 3p 3 $Constraint$matrix$
Then!set: $ 1 0 0 0
3 3 0
f '(0) = 3(p1 p 0 ) Basis$matrix:$ B = C1 = 0
3 6 3 0
!f '(1) = 3(p 3 p 2 ) 1 3 3 1
n
Cubic$Bzier$Curve$ uB = bi (u) NonPLocal$Control$
i=0
Blending$functions:$
$ f (u) = (1 u)3 p 0 + 3u(1 u)2 p1 + 3u 2 (1 u)p 2 + u 3 p 3
Every$control$point$aects$every$point$
$ = (1 3u + 3u u )p 0 + (3u 6u 2 + 3u 3 )p1 + (3u 2 3u 3 )p 2 + u 3 p 3
2 3 on$the$curve$(except$the$endpoints)$
$ $
b0,3(u)! b1,3(u)! b2,3(u)! b3,3(u)!
$ b(u)!
Moving$a$single$control$point$aects$
$ y!
$ b (u)!
0,3 b3,3(u)! the$whole$curve!$
$ 3
$f (u) = bi,3 (u)p i b (u)1,3 ! b2,3(u)!
i=0
$ 3
u!
$Its$a$vector$space!$ $
$ Just$as$with$Euclidean$space,$
A$vector$space$is$dened$by$a$set$of$basis$ there$are$innite$number$of$possible$basis$
independent$vectors$ $
here$vector$=$polynomial$ For$cubic,$the$basis$functions$could$be,$for$example:$
linear$combination$of$the$basis$polynomials$spans$the$space$ 1, 1+x, 1+x+x2, 1+xx2+x3!
x3, x3x2, x3+x, x3+1!
Durand$ Durand$
Basis$Matrix$and$Basis$Functions$ Discretization$
A$basis$matrix$(B)$transforms$the$canonical$basis$(u)$to$ Arbitrary$curves$have$an$uncountable$
another$basis:$ number$of$parameters$
$ n $
f (u) = ua = uBp = (1 u)p 0 + up1 = bi (u)p i RealPnumber$function$value$expanded$
$ i=0
into$an$innite$set$of$basis$functions:$
$ n
uB = bi (u) $
$ f (u) = bi (u)p i
i=0 $
$ $
i=0
The$bi(u)s$are$the$basis$functions$of$the$other$basis$ Approximate$by$truncating$set$at$
(weve$known$them$as$the$blending$functions)$ some$reasonable$point,$e.g.,$3:$
3
f (u) = bi (u)p i
i=0
OBrien$
Discretization$ Bernstein$Basis$Polynomials$
In$the$linear$case,$the$basis$functions$are$b0(u) = (1u)$
and$b1(u) = u$ The$basis$functions$for$Bzier$curves$can$in$general$
$ 1! be$expressed$as$the$Bernstein$basis$polynomials:$$
$ $
$ $ b (u) = n u k (1 u)n k = n!
u k (1 u)n k
$ $ k,n
k k!(n k)!
0! 1! 2!
$ $ n
(these$are$triangle$basis,$the$ith$functions$are$shifted$versions$of$the$0th)$ n!
Bzier$curve$eqn:$ f (u) = p k u k (1 u)n k
0 u < 1 k =0 k!(n k)!
1 + u 1 < u < 0
b(u) =
1 u 0 < u < 1
0 u >1
James,Hanrahan$ Shirley$
Bernstein$Polynomials$ Rendering$Bzier$Curves$
for$Cubic$Bzier$ b(u) How$do$you$rasterize$a$Bzier$curve?$$
n generally$no$lowPlevel$support$for$drawing$curves$$
n!
f (u) = p k u k (1 u)n k b0 b3 can$only$draw$line$segments$or$individual$pixels$
k=0 k!(n k)! b1 b2
b0(u) = (1u)3! Approximate$the$curve$as$a$series$of$line$segments$
b1(u) = 3u(1u)2! analogous$to$tessellation$of$a$surface$
b2(u) = 3u2(1u)! u
!
b3(u) = u3! de$Casteljau$algorithm$easily$and$adaptively$
Properties:$ subdivide$a$Bzier$curve$into$smaller$segments$
p1 continue$to$subdivide$until$the$new$control$points$are$close$
each$bi$species$the$inuence$of pi! to$being$collinear,$then$approximate$with$a$straight$line$
p3
convex$hull:$bi = 1, bi 0! distance$of$control$point$pi$from$the$line$through$p0$and$pn:$
p0
u=1
interpolates$only$at$p0$and$p3! (p n p 0 ) (p n p i )
u=0
b0 =$1$at$u = 0,$b3 =$1$at$u = 1$ p2
d=
b1$and$b2 never$reach$1$ pn p0
Durand,Hodgins$ Fussell,$Shirley,$TP3$
Subdividing$Bzier$Curves$ Subdividing$Bzier$Curves$
Given$a$Bzier$curve$dened$by$p0, p1, p2, ..., pn! Subdivision$doesnt$change$the$shape$
we$want$to$nd$two$sets$of$n+1$control$points$ of$a$Bzier$curve$
q0, q1, q2, ..., qn$and$r0, r1, r2, ..., rn$such$that:$ asymptotically,$the$control$polygons$of$the$
subdivided$curve$converge$to$the$actual$
the$Bzier$curve$dened$by$qi's$is$the$
curve$(at$a$quadratic$rate)$
piece$of$the$original$Bzier$curve$on$[0, u]!
$
the$Bzier$curve$dened$by$ri's$is$the$
Other$uses$of$subdivision:$
piece$of$the$original$Bzier$curve$on$[u, 1]!
!
collision/intersection$detection$
BC
p1B p2
C the$union$of$convex$hulls$of$the$subdivided$curve$is$
The$control$points$of$the$ q
AC2 AD
rBD
1 a$subset$of$the$convex$hull$of$the$original$curve$
subdivided$curve$are$computed$ qr03 recursive$search$
using$de$Casteljaus$algorithm$ qAB
1 r2
CD
good$for$curve$editing$and$approximation:$$
local$renement:$change$the$control$point(s)$of$
one$of$the$subdivided$curve$
p0A
q pr3
D
Shirley,$Manocha$ Manocha,$Durand$
Converting$Spline$Representations$
OpenGL$Evaluators$
The$Evaluators$turn$Bzier$ All$the$cubic$splines$are$equivalent$(span$the$same$space):$
curve$formulae$into$vertices$ f(u) = ua = uBp!
where:$
u$is$the$canonical$basis$set,! Other$curve$
representations$can$
B$the$basis$matrix,$and$
be$converted$to$
p$the$control$points!
Bzier$for$rendering!$
$
To$use$a$dierent$spline$is$just$changing$basis$matrix:$
f(u) = ua = uBp = u (Balt Balt-1) B p"
= u Balt (Balt-1 B p) = u Balt palt!
we$transform$the$control$points$from$one$type$to$the$
other:$palt = Balt-1 B p$
*Think$of$the$Display$list$as$serverPside$vertex$array$
**Direct3D$has$a$more$powerful$Input$Assembler$
Redbook$ Marschner$
Rendering$Curves$ Joining$Bzier$Curves$
We$can$represent$more$complex$curve$either$by$
Other$curve$representations$ CatmullPRom$to$Hermite:$ increasing$the$degree$of$the$polynomial,$which$can$
can$be$converted$to$Bzier$ p0,H = p1,CR! be$computationally$expensive$and$hard$to$control,$
for$rendering$ p1,H = (p2,CR p0,CR)!
p2,H = p2,CR!
or$by$joining$multiple$cubic$curve$segments$
$ $
p3,H = (p3,CR p1,CR)!
CatmullPRom$to$Bzier:$ $ $
p$0,B 0 1 0
0 p 0,CR
Bzier$to$Hermite:$ $
$p1,B 1 1 1 0 p1,CR
p0,H = p0,B! $
=
6 6
$
p 2,B 0 1 1
1 6 p 2,CR p1,H = 3(p1,B p0,B)! $
6
p$3,B 0 0 1 0 p 3,CR p2,H = p3,B! $
$ p3,H = 3(p3,B p2,B)! $
What$is$the$highest$degree$of$parametric$
continuity$(C 0,$C1,$C 2)$Bzier$spline$can$guarantee?!
Hanrahan$ Shirley$
Joining$Bzier$Curves$ Parametric$Surfaces$
MultiplePsegment$cubic$Bzier$curve$can$achieve$ Our$discussions$on$parametric$cubic$curves$can$
be$generalized$to$parametric$bicubic$surfaces:$
G1$continuity$if:$q0 = f2(0) = f1(1) = p3$
parametric$curves$ $parametric$surfaces$
and$(q1 q0) = k(p3 p2),$the$three$
splines$ $parametric$patches$
points$(p2,$p3 = q0,$and$q1)$are$collinear$ control$graph$ $control$mesh$
if$you$changed$one$of$these$three,$ p2
you$must$change$the$others,$but$only$ Original$teapot$specied$with$Bzier$patches$
f 1(u)
need$to$change$these$three,$
not$p1$for$example$ $local$support$ p3 = q0 f 2(u)
Shirley$
C1$continuity$if$k = 1! q1
cant$guarantee$C 2$or$higher$continuity$
each$additional$degree$of$continuity$restricts$the$position$of$an$ Bzier$patches$
additional$control$point$ $cubic$Bzier$has$none$to$spare$ control$mesh$
Parametric$Surfaces$ Bilinear$Patch$
Simplest$case:$4$points,$cross$product$of$2$linear$
Surface$is$a$curve$swept$through$space$ segments$
Instead$of$control$points$along$a$curve,$ basis$function$is$a$3D$tent:$interpolates$control$points$
make$each$control$point$itself$a$curve$ Farin$
if$all$4$control$points$are$coPplanar,$the$patch$is$at$
choice$of$dierent$splines:$type,$order,$etc.$ otherwise,$we$get$a$saddlePshape$(hyperbolic$paraboloid)$
curved$surface$
the$parametric$curves$are$all$straight$line$segments!$
boundaries$are$straight$line$segments$
the$surface$is$doubly$ruled:$2$straight$lines$through$every$point$
not$a$terribly$useful$modeling$primitive$
OBrien,$James$ James,$Schulze$
Parametric$Patches$ Bicubic$Patch$
Surface$is$partitioned$into$patches:$ In$matrix$form:$
piecewise$parametric$surfaces$ v=1! s(u,v) = a 0 b 0 + a1b 0u + a 0 b1v + ...+ a 3b 3u 3v 3
$ v=1!
u=0!
u=1!
Similarly,$we$can$dene$a$surface$as$the$tensor$
product$of$two$curves....$
Durand$ Funkhouser,$Watt$Fig.$6.21$
Parametric$Bicubic$Patch$ Parametric$Bicubic$Patch$
As$with$curves,$we$can$solve$for$the$16$unknowns$ Starting$with$parametric$curve$$f(u) = uBq!
with$16$control$points,$which$form$a$control$mesh$ To$create$parametric$surface,$replace$control$
points$qi$with$a$parametric$curve$gi (v)!
p33
p32 p23
Assuming$the$same$basis$matrix$is$used$for$gi(v):
p22
gi(v) = vBpi,$where$pi$are$the$control$points$
p31 p12
p21
p11
p13
for$curve$gi(v):$pi =[pi0 pi1 pi2 pi3 ]T$
p30
p20
p10 p02 To$compute$the$tensor$product,$rewrite$
p01
p03 (gi(v))T = (v B pi)T!
p00
= piT BT vT!
= [pi0 pi1 pi2 pi3 ] BT vT$
Fussell,Curless$ Popovic$
Parametric$Bicubic$Patches$ Example:$Bicubic$Bzier$Patches$
Combining$(g(v))T$and$s(u,v) = uB(g(v))T$we$get:$
In$matrix$form:$
$ p 00 p 01 p 02 p 03
$
p10 p11 p12 p13 T T p 00 p 01 p 02 p 03
$ s(u,v) = uB B v
p 20 p 21 p 22 p 23 p10 p11 p12 p13 T
s(u,v) = uB Bzier B Bzier v T
$ p 30 p 31 p 23 p 33 p 20 p 21 p 22 p 23
$
s(u,v) = p ij bij (u,v), bij (u,v) = bi (u)b j (v) p 30 p 31 p 23 p 33
$ ij
where$B$is$the$basis$matrix$of$a$1D$parametric$cubic$ 1 0 0 0 p 00 p 01 p 02 p 03 1 3 3 1 1
curve$(e.g.,$Bzier,$BPsplines,$etc.)$and$bi()s$the$ 3 3 0 0 p10 p11 p12 p13 0 3 6 3 v
= 1 u u 2 u3
3 6 3 p 23 0 0 3 3
corresponding$basis$functions$ 0 p 20 p 21 p 22
v2
1 3 3 1 p 30 p 31 p 23 p 33 0 0 0 1 v3
The$2D$patch$basis$functions$(bij(u,v))$are$separable$
products$of$the$1D$curve$basis$functions$ Popovic$ Cheng$
Bicubic$Bzier$Patches$ Bzier$Patches$
Properties$analogous$to$those$of$cubic$Bzier$curves$
interpolate$four$corner$points$ Tensor$product$of$2$Bzier$segments$
tangency$at$corners$ $
convex$combination$ Quadratic:$ Basis$functions$of$patch:$
ane$invariant$ $ product$of$2$Bernstein$
local$control$ $ polynomials:$
C1! b0(u)b0(v), , b3(u)b3(v)!
!
! Cubic:$
!
!
"
!
!
!
!
Only$variation$diminishing$doesnt$apply!$
Durnad,Watt,$FvD$Fig.$11.43$ Durnad,Watt,$FvD,$Hearn&Baker$
Surface$Normal$ Bzier$Patch$Join$
s(0,1)! s(u,v)!
s(1,1)! C 0:$positional$continuity $C1:$tangential$continuity$
Tangents$to$the$surface$at$any$ requires$aligning$boundary$curves $requires$aligning$boundary$
point$can$be$computed$from$ $curves$and$derivatives$
innitesimally$nearby$points$ s(0,0)!
$ s(1,0)!
Holding$one$parameter$constant,$we$compute$the$
partial$derivative$(tangent$vector)$in$each$direction$
$
s(u,v) n n d
tu = = p ij bi (u) b j (v) $Unit$normal:$
u i=0 j=0
ds
s(u,v) n n tu tv
d n(u, v) =
tv = = p ij bi (u) b j (v) tu tv
v i=0 j=0 ds
Yu,Curless$ Watt$00$
Bzier$Curve/Surface$Problems$
To$make$a$long$continuous$curve$with$Bzier$
segments$requires$using$many$segments$
same$for$large$surface$
Maintaining$continuity$requires$constraints$on$the$
control$point$positions$
the$user$cannot$arbitrarily$move$control$vertices$and$
automatically$maintain$continuity$
the$constraints$must$be$explicitly$maintained$
it$is$not$intuitive$to$have$control$points$that$are$not$free$