48
Natural way to think of a surface: curve is swept, and (possibly) deformed. Examples: ruled surface (line is swept), surface of revolution (circle is swept along line, grows and shrinks). Surface form: Tensor product surfaces x(u, v )=(x 1 (u)x 2 (v ),y 1 (u)y 2 (v ),z 1 (u)z 2 (v ))

Tensor product surfaces

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tensor product surfaces

• Natural way to think of a surface: • curve is swept, and (possibly) deformed. • Examples:

• ruled surface (line is swept), • surface of revolution (circle is swept along line, grows and shrinks).

• Surface form:

Tensor product surfaces

x(u, v) = (x1(u)x2(v), y1(u)y2(v), z1(u)z2(v))

Page 2: Tensor product surfaces

Tensor product surfaces

• Usually, domain is rectangular; • until further notice, all domains are rectangular.

• Classical tensor product interpolate:• Gouraud shading on a rectangle

• this gives a bilinear interpolate of the rectangles vertex values.

• Continuity constraints for surfaces are more interesting than for curves

• Our curves have form:�

i

Xifi(u)

Page 3: Tensor product surfaces

Tensor product surfaces

• Suggests form for surfaces:

ij

Xijfi(u)fj(v)

Page 4: Tensor product surfaces

Extruded surfaces

• Geometrical model - Pasta machine

• Take curve and “extrude” surface along vector

• Many human artifacts have this form - rolled steel, etc.

(x(s, t), y(s, t), z(s,t)) = (xc (s), yc (s), zc (s)) + t(v0 ,v1,v2 )

Vector

Curve

t varies along lines varies along curve

Page 5: Tensor product surfaces

Cones

• From every point on a curve, construct a line segment through a single fixed point in space - the vertex

• Curve can be space or plane curve, but shouldn’t pass through the vertex

Vertex

Curve

t varies along line

s varies along curve

(x(s, t), y(s, t), z(s,t)) = (1− t)(xc (s), yc (s), zc (s))+ t(v0 ,v1 ,v2 )

Page 6: Tensor product surfaces

Commercial particle systems (wondertouch)

Page 7: Tensor product surfaces

Surfaces of revolution

• Plane curve + axis• “spin” plane curve

around axis to get surface

• Choice of plane is arbitrary, choice of axis affects surface

• In this case, curve is on x-z plane, axis is z axis.

(x(s, t), y(s, t), z(s,t)) =

(xc (s) cos(t), xc (s)sin(t), zc (s))

Page 8: Tensor product surfaces

SOR-2

• Many artifacts are SOR’s, as they’re easy to make on a lathe.

• Controlling is quite easy - concentrate on the cross section.

• Axis crossing cross-section leads to ugly geometry.

z

yx

t varies around circle

s varies up curve

Page 9: Tensor product surfaces

Ruled surfaces

• Popular, because it’s easy to build a curved surface out of straight segments - eg pavilions, etc.

• Take two space curves, and join corresponding points - same s - with line segment.

• Even if space curves are lines, the surface is usually curved.

(x(s, t), y(s, t), z(s,t)) =(1− t)(x1(s), y1 (s), z1(s))+

t(x2 (s),y2 (s), z2 (s))

Page 10: Tensor product surfaces

c1(s)

c2(s)

s varies

t var

ies

Page 11: Tensor product surfaces
Page 12: Tensor product surfaces

Tensor Product Bezier Patches

• By the same process as with Bezier curves, we can derive the form:

• here B(u) are the Bezier-Bernstein polynomials, as before• these are blending functions

• It follows from the tensor product form that:• interpolates four vertex points• surface is in convex hull of control points• tangent plane at each vertex is given by three points at that vertex• repeated de Casteljau (one direction, then the other) gives a point on the

surface, and tangent plane to surface

n�

i=0

m�

j=0

bijBni (u)Bm

j (v)

Page 13: Tensor product surfaces

Tensor product Bezier patches

Page 14: Tensor product surfaces
Page 15: Tensor product surfaces

Tensor Product Bezier patches

• Construct by de Casteljau algorithm• repeated linear interpolation one way

• now go the other way• OR

• repeated bilinear interpolation

Page 16: Tensor product surfaces

Repeated linear interpolation one way yields control points; use these points for repeated linear interpolation in the other direction

Page 17: Tensor product surfaces

Bilinear interpolation

Page 18: Tensor product surfaces

Bilinear interpolation

Page 19: Tensor product surfaces

Bilinear Interpolation

Page 20: Tensor product surfaces

Repeated bilinear interpolation yields a surface too

Page 21: Tensor product surfaces

Tensor Product Bezier Patches

• It follows from the tensor product form that surface:• interpolates four vertex points• tangent plane at each vertex is given by three points at that vertex• repeated de Casteljau (one direction, then the other) gives a point on the

surface, tangent plane to surface

Page 22: Tensor product surfaces

Tensor product Bezier patches

• Recall we wrote curves as:

• We can write surface as:

�u3 u2 u 1

�M

p0

p1

p2

p3

�u3 u2 u 1

�M

p00 p01 p02 p03

p10 p11 p12 p13

p20 p21 p22 p23

p30 p31 p32 p33

MT

v3

v2

v1

Page 23: Tensor product surfaces

Bezier curve subdivision

Page 24: Tensor product surfaces

Applies also to surfaces

Page 25: Tensor product surfaces
Page 26: Tensor product surfaces

Tensor product splines

• Simplest• bicubic interpolating surface

• B-splines

Page 27: Tensor product surfaces

Bicubic interpolating surfaces

• We have a grid in u, v of parameter values• know height at each grid point

• and anything else we need to know (continuity means this is very little)• must build an interpolating surface

• Form in each grid block:

Zij(s, t) =�3

i=0

�3j=0 cijsitj

Page 28: Tensor product surfaces

Constructing a spline

• Notation:

p =∂Z

∂x

q =∂Z

∂y

r =∂2Z

∂x∂y

Page 29: Tensor product surfaces

Step 1: Patches from info

• Z, p, q, r at each corner yields the patch

• Linear algebra in monomials (exercise)

Page 30: Tensor product surfaces

Step 2: Continuity reveals p’s

p’s follow from continuity, spline in x dir

Page 31: Tensor product surfaces

Step 3: Continuity reveals q’s

q’s follow from continuity, spline in y dir

Page 32: Tensor product surfaces

Step 4: Continuity reveals r’s

Because p is a cubic spline in y, resp q is a cubic spline in x,

we can “fill in” r from corners

Page 33: Tensor product surfaces
Page 34: Tensor product surfaces

Tensor product bsplines

• (As you’d expect) form is

• Two cases are most important• periodic (surface is a torus)• patches

• we repeat knots at start and finish of s, t

�ij PijNid(s)Njk(t)

Page 35: Tensor product surfaces
Page 36: Tensor product surfaces
Page 37: Tensor product surfaces
Page 38: Tensor product surfaces

B-Spline subdivisionD.A. Forsyth, with slides from John Hart

Page 39: Tensor product surfaces
Page 40: Tensor product surfaces
Page 41: Tensor product surfaces
Page 42: Tensor product surfaces
Page 43: Tensor product surfaces
Page 44: Tensor product surfaces
Page 45: Tensor product surfaces
Page 46: Tensor product surfaces

Example

Page 47: Tensor product surfaces

Another Example

Page 48: Tensor product surfaces