



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A portion of jorg's graphics lecture notes covering curved geometry in two variables. Topics include tensor-product bézier representation, glmap2, nurbs, subdivision surfaces, and catmull-clark subdivision. The notes discuss the evaluation of polynomial patches, de casteljau's algorithm, and rendering curved surfaces.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




In two variables, a 4-sided polynomial piece (or patch)
p(u, v) =
i+j=d 1
k+l=d 2
c(i, k)Bj,i(u)Bk,l(v)
glMap2* (target,u start, u end, ustride, uorder,
. v start, v end, vstride, vorder, *points)
x
y
z
p ( u , v )
u = 1
u = 0
v = 1
v = 0 p 30
p 03
p 33 p 00 p 00
p 01
p 10 p 11
10bezsurf.c, 10bezmesh.c cross-sectional design with guide curve Subdivision and de Casteljau’s algorithm (recursive approximate evalua- tion)
p 30
p 03
p 33
p 00
p 30
p 03
p 33
p 00
p 30
p 03
p 33
p 00
New points created by subdivision Old points discarded after subdivision Old points retained after subdivision p 30
p 03
p 33
p 00
New points created by subdivision Old points discarded after subdivision Old points retained after subdivision
This is a routine you have to write yourself (something like) glMap∆* (target,u start, u end, stride, order, *points)
In two variables, a 3-sided polynomial piece (or patch)
p =
i+j+k=d
c(i, j, k)Bi,j,k,
Bi,j,k(u, v, w) = d! i!j!k!
uivj^ wk^ , u + v + w = 1.
Evaluation of the polynomial p of degree d with coefficients c at the barycen- tric coordinates u, v, w (typically in the unit triangle) is via de Casteljau’s al- gorithm: EvalCoord (u, v, w, d, c)
for l = 1..d
. for i + j + k = d − l . c(i, j, k) = u · c(i + 1, j, k) + v · c(i, j + 1, k) + w · c(i, j, k + 1)
n = (c(0, 1 , 0) − c(1, 0 , 0)) × (c(0, 0 , 1) − c(1, 0 , 0))
return( puvw = c(0, 0 , 0), normal = n/‖n‖)
p(u, v, w) = c(0, 0 , 0).
Curved PN Triangles FIG/PNHead.eps.gz, FIG/PNGallery.eps.gz
Mid-edge [Peters, Reif 95]
Peters
Doo-Sabin[1978] Chaikin’s corner cutting (carpenters algorithm): 1/4,3/ Doo-Sabin masks generalize bi-2 spline
1 / 16 3 / 16
3 / 16 9 / 16
to n-sided facets.
Catmull-Clark [1978]
What are the corner cutting ratios here?
Loop Loop 87, demo PROJ/subdiv Box-spline demo
What is rendered ultimately is an averaged, linearized approximation. Example in 2D: y = x^2 for x ∈ [− 1 ..1]. The line segment that connects (− 1 , y(−1)) to (1, y(1)) is based on exact evaluation at the parameters −1 and 1 but is a much poorer approximation to the parabola piece than the line segment (− 1 , 1 /2) to (1, 1 /2). If one renders a triangulation of the surface, there is no reason to believe that a triangulation or per-pixel evaluation based on evaluation ‘exactly at the vertices’ and averaging this value (as when constructing a triangle of a triangle mesh) is a better approximation to the true surface than any other evaluation. All we know is that the error does not occur at the vertices but in the interior of the approximating triangles. The error in the interior of the triangle may be far more than the distance between a control point and the surface or a control triangle and the surface.