3D Object Representations • Points • Solids o Range image o Voxels o Point cloud o BSP tree Parametric & Implicit o CSG o Sweep Surfaces • Surfaces o Polygonal mesh Adam Finkelstein & Tim Weyrich o Subdivision • High-level structures Princeton University o Parametric o Scene graph o Implicit o Application specific COS 426, Spring 2008

1 2

Surfaces Parametric Surfaces • What makes a good representation? • Boundary defined by parametric functions:

o Accurate o x = fx(u,v) o Concise o y = fy(u,v) o Intuitive specification o z = fz(u,v) o Local support y o Affine invariant Parametric functions v define mapping from o Arbitrary topology (u,v) to (x,y,z): v o Guaranteed continuity o Natural parameterization x o Efficient display u u o Efficient intersections z

H&B Figure 10.46 FvDFH Figure 11.42

3 4

Parametric Surfaces Parametric Surfaces • Boundary defined by parametric functions: • Example: surface of revolution

o x = fx(u,v) o Take a curve and rotate it about an axis

o y = fy(u,v)

o z = fz(u,v)

• Example: ellipsoid

H&B Figure 10.10 Demetri Terzopoulos

5 6 Parametric Surfaces Parametric Surfaces • Example: swept surface • Example: swept surface o Sweep one curve along path of another curve o Making sea shells

Demetri Terzopoulos Fowler

7 8

Parametric Surfaces Piecewise Polynomial Parametric Surfaces • How do we describe arbitrary smooth surfaces • Surface is partitioned into parametric patches: with parametric functions?

Same ideas as parametric splines! H&B Figure 10.46 Watt Figure 6.25

9 10

Parametric Patches Parametric Patches • Each patch is defined by blending control points • Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control points

Q(u,v)? Q(0,1) Q(1,1)

Q(0,0)

Q(1,0)

Same ideas as parametric curves! FvDFH Figure 11.44 Watt Figure 6.21

11 12 Parametric Patches Parametric Patches • Point Q(u,v) on the patch is the tensor product of • Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control points parametric curves defined by the control points

Q(0,1) Q(0,1) Q(1,1) Q(1,1)

u=0.4 u=0.4 Q(0,0) Q(0,0)

Q(1,0) Q(1,0)

Watt Figure 6.21 Watt Figure 6.21

13 14

Parametric Patches Parametric Patches • Point Q(u,v) on the patch is the tensor product of • Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control points parametric curves defined by the control points

Q(u,v) Q(0,1) Q(0,1) Q(1,1) Q(1,1)

u=0.4 u=0.4 v=0.5 u=0.4 u=0.4 Q(0,0) Q(0,0)

Q(1,0) Q(1,0)

Watt Figure 6.21 Watt Figure 6.21

15 16

Parametric Bicubic Patches B-Spline Patches Point Q(u,v) on any patch is defined by combining control points with polynomial blending functions:

Where M is a matrix describing the blending functions for a parametric cubic curve (e.g., Bezier, B-spline, etc.) Watt Figure 6.28

17 18 Bezier Patches Bezier Patches • Properties: o Interpolates four corner points o Convex hull o Local control

FvDFH Figure 11.42 Watt Figure 6.22

19 20

Bezier Surfaces Bezier Surfaces

• Continuity constraints are similar to the ones for • C0 continuity requires aligning boundary curves Bezier splines

FvDFH Figure 11.43 Watt Figure 6.26a

21 22

Bezier Surfaces B-Spline Patches

• C1 continuity requires aligning boundary curves and derivatives

Watt Figure 6.26b Watt Figure 6.28

23 24 Parametric Surfaces 3D Object Representations • Advantages: • Points • Solids o Easy to enumerate points on surface o Range image o Voxels o Possible to describe complex shapes o Point cloud o BSP tree o CSG • Disadvantages: o Sweep o Control mesh must be quadrilaterals • Surfaces o Continuity constraints difficult to maintain o Polygonal mesh o Hard to find intersections o Subdivision • High-level structures o Parametric o Scene graph o Implicit o Application specific

25 26

Implicit Surfaces Implicit Surfaces • Represent surface with function • Surface defined implicitly by function over all space

Kazhdan Kazhdan

27 28

Implicit Surfaces Implicit Surfaces • Surface defined implicitly by function: • Normals defined by partial derivatives o f (x, y, z) = 0 (on surface) o (x, y, z) = (df/dx, df/dy, df/dz) o f (x, y, z) < 0 (inside) o f (x, y, z) > 0 (outside)

f(x,y) = 0 on curve

Normals Tangents Curvatures f(x,y) < 0 inside

f(x,y) > 0 outside Turk Bloomenthal

29 30 Implicit Surface Properties Implicit Surface Properties (1) Efficient check for whether point is inside (2) Efficient surface intersections o Evaluate f(x,y,z) to see if point is inside/outside/on o Substitute to find intersections

Ray: P = P0 + tV : |P - O|2 - r 2 = 0

Substituting for P, we get: ! |P + tV - O|2 - r 2 = 0 P" 0 P V Solve quadratic equation: r 2 ! at + bt + c = 0 P O where: 0 ! a = 1

! b = 2 V • (P0 - O) H&B Figure 10.10 2 2 ! c = |P0 - C| - r = 0

31 32

Implicit Surface Properties Implicit Surface Properties (3) Efficient boolean operations (CSG) (4) Efficient topology changes o Union, difference, intersect o Surface is not represented explicitly!

Union Difference

Bloomenthal Bourke

33 34

Implicit Surface Properties Comparison to Parametric Surfaces (4) Efficient topology changes • Implicit o Surface is not represented explicitly! o Efficient intersections & topology changes • Parametric o Efficient “marching” along surface & rendering

Bloomenthal Bloomenthal

35 36 Implicit Surface Representations Implicit Surface Representations • How do we define implicit function? • How do we define implicit function? o Algebraics ! Algebraics o Blobby models o Blobby models o Skeletons o Skeletons o Procedural o Procedural o Samples o Samples o Variational o Variational

37 38

Algebraic Surfaces Algebraic Surfaces • Implicit function is polynomial • Most common form: quadrics o f(x,y,z)=axd+byd+czd+dxd-1y+dxd-1z +dyd-1x+... o f(x,y,z)=ax2+by2+cz2+2dxy+2eyz+2fxz+2gx+2hy+2jz+k

• Examples o Sphere o Ellipsoid o o Paraboloid o Hyperboloid

H&B Figure 10.10 Menon

39 40

Algebraic Surfaces Algebraic Surfaces • Higher degree algebraics • Function extends to infinity o Must trim to get desired patch (this is difficult!)

Cubic Quartic Degree six

41 42 Algebraic Surfaces Algebraic Surfaces • Equivalent • Intersection o Tensor product patch of degree m and n curves o Intersection of degree m and n algebraic surfaces yields algebraic function with degree 2mn yields curve with degree mn

Bicubic patch has degree 18! Intersection of bicubic patches has degree 324!

43 44

Implicit Surface Representations Blobby Models • How do we define implicit function? • Implicit function is sum of spherical basis functions o Algebraics ! Blobby models o Skeletons o Procedural o Samples o Variational

45 46

Blobby Models Blobby Models • Sum of two blobs • Sum of four blobs

Turk Turk

47 48 Blobby Models: radial basis funcs Blobby Model of Face • Blobby molecules

• Meta balls

• Soft objects

Bourke

49 50

Blobby Model of Face Blobby Model of Face

51 52

Blobby Model of Head Blobby Model of Head

53 54 Blobby Model of Head Blobby Models

Objects resulting from CSG of implicit soft objects and other primitives

Menon

55 56

Implicit Surface Representations Skeletons • How do we define implicit function? • Bulge problem o Algebraics o Blobby models ! Skeletons o Procedural o Samples o Variational

57 58

Skeletons Skeletons • Bulge problem • Convolution surfaces

Bloomenthal

59 60 Implicit Surface Representations Procedural Implicits • How do we define implicit function? • f(x,y,z) is result of procedure o Algebraics o Example: Mandelbrot set o Blobby models o Skeletons ! Procedural o Samples o Variational

H&B Figure 10.100

61 62

Implicit Surface Representations Sampled Functions • How do we define implicit function? • Most common example: voxels o Algebraics o Interpolate samples stored on regular grid o Blobby models o Isosurface at f(x,y,z) =0 defines surface o Skeletons o Procedural 2.3 1.7 0.9 0.2 ! Samples o Variational 1.2 0.4 0.1 -0.8

0.3 -0.5 -0.7 -1.4

0.2 -0.9 -1.7 -2.5

63 64

Sampled Functions Implicit Surface Representations • Acquired from simulations or scans • How do we define implicit function? o Algebraics o Blobby models o Skeletons o Procedural o Samples ! Variational

Airflow Inside a Thunderstorm Visible Human (Bob Wilhelmson, (National Library of Medicine) University of Illinois at Urbana-Champaign)

65 66 Variational Implicit Surfaces Example Implicit Surface

Turk Turk

67 68

Implicit Surface Summary Summary • Advantages: o Easy to test if point is on surface o Easy to compute intersections/unions/differences Feature Polygonal Mesh Parametric Surface Subdivision Surface o Easy to handle topological changes Implicit Surface Accurate! No! Yes! Yes! Yes • Disadvantages: Concise! No! Yes! Yes! Yes o Indirect specification of surface Intuitive specification! No! No! Yes! No o Hard to describe sharp features Local support! Yes! No! Yes! Yes Affine invariant! Yes! Yes! Yes! Yes o Hard to enumerate points on surface Arbitrary topology! Yes! No! No! Yes » Slow rendering Guaranteed continuity ! No! Yes! Yes! Yes Natural parameterization! No! No! Yes! No! Efficient display! Yes! No! Yes! Yes Efficient intersections! No! Yes! No! No

69 70