Jorg's Lecture: Curved Geometry in 2 Variables - Tensor-Product Bézier Surfaces, Study notes of Computer Graphics

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

Pre 2010

Uploaded on 03/18/2009

koofers-user-m0f-1
koofers-user-m0f-1 🇺🇸

7 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Jorg’s Graphics Lecture Notes Curved Geometry in 2 variables 1
Curved Geometry in 2 variables
Tensor-product ezier Representation
In two variables, a 4-sided polynomial piece (or patch)
p(u, v) = X
i+j=d1
X
k+l=d2
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
p30
p03
p33
p00 p00
p01
p11
p10
10bezsurf.c,10bezmesh.c
cross-sectional design with guide curve
Subdivision and de Casteljau’s algorithm (recursive approximate evalua-
tion)
p30
p03
p33
p00
p30
p03
p33
p00
p30
p03
p33
p00
New points created by subdivision
Old points discarded after subdivision
Old points retained after subdivision
p30
p03
p33
p00
New points created by subdivision
Old points discarded after subdivision
Old points retained after subdivision
pf3
pf4
pf5

Partial preview of the text

Download Jorg's Lecture: Curved Geometry in 2 Variables - Tensor-Product Bézier Surfaces and more Study notes Computer Graphics in PDF only on Docsity!

Curved Geometry in 2 variables

Tensor-product B´ezier Representation

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

glMap∆ – Definition

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‖)

  • The apex of this ‘subdivision simplex’ is the value of p at u, v, w, i.e.

p(u, v, w) = c(0, 0 , 0).

  • The three coefficients c(1, 0 , 0), c(0, 1 , 0), c(0, 0 , 1) define the tangent plane, i.e. n := (c(0, 1 , 0) − c(1, 0 , 0)) × (c(0, 0 , 1) − c(1, 0 , 0)) is a multiple of the normal.
  • The surface can be rendered as a triangle strip. (There are fast recursive ways to evaluate approximately)

Curved PN Triangles FIG/PNHead.eps.gz, FIG/PNGallery.eps.gz

Subdivision surfaces

Mid-edge [Peters, Reif 95]

Midedge Subdivision

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]

=n

=n

=n

=n

=n

=n

=n

=n

=n

=n

What are the corner cutting ratios here?

Loop Loop 87, demo PROJ/subdiv Box-spline demo

Rendering

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.