Surfaces • Boundary representation of objects • Smooth surfaces > Implicit representation f(x, y, z) = 0 > Parametric representation P(u,v) = (x(u,v) y(u,v) z(u,v)) Surfaces Parametric Surfaces P(u,v) = (x(u,v) y(u,v) z(u,v)) Surfaces Surface of Revolution • One of the simplest method to generate surfaces • Obtained by rotating 2D entity about an axis Point Line parallel to X axis y y x Circle x Cylinder Surfaces Surface of Revolution Parametric Form Parametric equation of the entity to be rotated P (t ) = [x (t ) y(t) z(t)] 0 ≤ t ≤ t max Rotation angle Φ The surface is now a bi-parametric function of two parameters t and Φ Example: Rotation about X – axis of an entity in XY plane Q( t , Φ) = [x(t) y(t)cosΦ y(t)sinΦ] Surfaces Surface of Revolution Sphere is generated by rotating a semi-circle centered at origin and lying in XY plane about X axis Circle: x = rcosθ, y = rsinθ Q (θ,Φ) = [x ycosΦ ysinΦ] = [rcosθ rsinθcosΦ rsinθsinΦ] Similarly ellipsoid is generated by rotating semi ellipse about X axis Surfaces Surface of Revolution Torus is generated by rotating a circle lying in XY plane but whose center does not lie on the axis of rotation. Circle: x = h + rcosθ y = k+ rsinθ Q(θ,Φ)=[h+rcosθ (k+rsinθ)cosΦ (k+rsinθ)sinΦ] (h, k) is the center of the circle Surfaces Surface of Revolution Matrix Form (X axis rotation) 0 1 0 cos ö S= 0 0 0 0 0 sin ö 0 0 0 0 0 1 (x, ycosΦ, ysinΦ) (x,y) Φ If parametric curve P(t) = FG Then surface of revolution Q(t, Φ)=FGS Can be extended for rotation about any arbitrary axis Surfaces Sweep Surfaces Sweep surfaces are the surfaces generated by traversing an entity along a path in space Q(t,s) = P(t) T(s) T(s) is called the sweep transformation Surfaces Sweep Surfaces Translation sweep of a circle generates a cylinder Translation sweep of a circle accompanied by scaling generates cone Surfaces Sweep Surfaces Example y y Cubic Spline Sweep Surface x 1 0 T (s ) = 0 0 x 0 0 0 0 ns 1 0 1 0 0 0 1 z Translation in Z Surfaces Sweep Surfaces Normal to the polygon or closed curve as the path is swept can be either kept fixed or it can be made the instantaneous tangent of the curve of sweep. Fixed normal Tangential normal Surfaces Bilinear Interpolation Linear Interpolation fits the simplest curve between two end points P2 P1 P(t) = (1-t) P1+ t P2 Surfaces Bilinear Interpolation Bilinear interpolation fits the simplest surface for the four corner points v b01 b11 u b00 v u b10 Surfaces Bilinear Interpolation Two Stage Process b01 b11 01 b00 = (1 − v )b00 + vb01 01 b10 = (1 − v )b10 + vb11 11 01 01 (u,v ) = (1 − u )b00 X (u,v ) = b00 + ub10 b00 b01 1 − v = [1 − u u ] b10 b11 v b01 b01 1 1 X (u,v ) = ∑ ∑ bij Bi1(u )B1j (v ) i =0 j =0 Surfaces Ruled Surfaces Given two space curves (C1 & C2) defined in parametric range [0,1], Find a surface X that contains both curves as boundary curves. X ( u,0) = C1 ( u) C2 X ( u,1) = C 2 ( u) v u Many solutions are possible C1 Surfaces Ruled Surfaces A simple solution is to do a linear interpolation in v C2 v u C1 X ( u, v ) = (1 − v )C 1 ( u) + vC 2 ( u) = (1 − v ) X ( u,0) + vX ( u,1) For constant u iso-parametric curve is a line Surfaces Coon’s Patch Given Four Boundaries C1(u),C2(u),D1(v),D2(v) C2 X ( u,1) = C 2 ( u) D1 v u X ( u,0) = C 1 ( u) C1 D2 X (0, v ) = D1 (v ) X (1, v ) = D2 (v ) Surfaces Coon’s Patch Ruled surface between C1(u),C2(u) C2 rC C1 Surfaces Coon’s Patch Ruled surface between C1(u),C2(u) Ruled surface between D1(v),D2(v) C2 D2 C1 rC D1 rD Surfaces Coon’s Patch Ruled surface between C1(u),C2(u) Ruled surface between D1(v),D2(v) C2 + C1 rC D2 D1 rD Surfaces Coon’s Patch Ruled surface between C1(u),C2(u) Ruled surface between D1(v),D2(v) C2 + C1 rC + rD D2 D1 Surfaces Coon’s Patch Something is extra which is the bilinear patch formed by the vertices rCD Surfaces Coon’s Patch C2 C1 + Coon’s Patch = rC + rD - rCD D1 D2 Surfaces Coon’s Patch Mathematically rC (u,v ) = (1 − v ) X (u,0) + vX (u,1) rD (u,v ) = (1 − u ) X (0,v ) + uX (1,v ) X (0,0) X (0,1) 1 − v rCD (u,v ) = [1 − u u ] v X ( 1 , 0 ) X ( 1 , 1 ) Surfaces Coon’s Patch Mathematically X(u,v)= rC + rD - rCD X (0,v ) 1 − v + [ X (u,0) X (u,v ) = [1 − u u ] X (1,v ) v X (0,0) X (0,1) 1 − v − [1 − u u ] X (1,0) X (1,1) v One can generalize with f1(u)=1-u ,f2(u)=u and g1(v)=1-v,g2(v)=v X (u,1)] Surfaces Parametric Surfaces P(u,v) = (x(u,v) y(u,v) z(u,v)) Surfaces Bezier Surface Given control points: b03 b00 b01 …. b33 b33 v u b00 b30 Surfaces Bezier Surface Bezier Curve (Revisit) b2 b1 P(t) b0 Mathematically n P (t ) = ∑ bi J in (t ) i =0 b3 b0 b1 b2 b3 : Control Polygon 0 ≤ t ≤1 Surfaces Bezier Surface Bezier Curve (Revisit) The de Casteljau Algorithm b01 (t ) = (1 − t )b0 + tb1 b1 b11 b11(t ) = (1 − t )b1 + tb2 b02 (t ) = (1 − t )b01 (t ) + tb11(t ) b01 = (1 − t )2 b0 + 2t (t − 1)b1 + t 2b2 b02 b2 b0 0 t 1 Surfaces Bezier Surface Bezier Curve (Revisit) The de Casteljau Algorithm Bezier Curve is constructed using successive linear interpolation Bezier Surface can be constructed using successive bi-lineear interpolation Surfaces Bezier Surface Bilinear Interpolation(Revisit) Two Stage Process b01 b00 b11 01 b00 = (1 − v )b00 + vb01 01 b10 = (1 − v )b10 + vb11 11 01 01 (u,v ) = (1 − u )b00 X (u,v ) = b00 + ub10 b00 b01 1 − v = [1 − u u ] v b b 10 11 v u b10 1 1 X (u,v ) = ∑ ∑ bij Bi1(u )B1j (v ) i =0 j =0 Surfaces Bezier Surface De Castelejau Algorithm b 11 b00 = [1 − u u ] 00 b10 b03 b01 1 − v b11 v b33 v u b00 b30 Surfaces Bezier Surface De Castelejau Algorithm b03 b33 v u b00 b30 Surfaces Bezier Surface De Castelejau Algorithm 11 11 b00 1 − v b01 = [1 − u u ] 11 11 v b b 10 11 b03 b33 22 b00 v u b00 b30 Surfaces Bezier Surface De Castelejau Algorithm b03 b33 v u b00 b30 Surfaces Bezier Surface De Castelejau Algorithm 33 b00 b03 22 b00 = [1 − u u ] 22 b10 22 1 − v b01 22 b11 v b33 v u 33 b00 b00 b30 Surfaces Bezier Surface De Castelejau Algorithm Mathematically r −1,r −1 r −1,r −1 1 − v b b i, j i , j +1 r ,r bi , j = [1 − u u ] r −1,r −1 r −1,r −1 v b b + + + i 1 , j i 1 , j 1 r = 1, 2, L n i , j = 0,1,L(n − r) Surfaces Bezier Surface De Castelejau Algorithm Problem: If degree in u is not equal to the degree in v b03 b23 v u b00 b20 Surfaces Bezier Surface Tensor Product A surface can be thought of as being swept out by a moving and deforming curve Surfaces Bezier Surface Tensor Product Let the sweep curve be: b ( u) = m m m ∑ bi Bi i =0 ( u) Each control point bi traverses a Bezier curve bi = bi (v ) = n n ∑ bi , j B j j=0 (v ) Surfaces Bezier Surface Tensor Product Combining b m ,n ( u, v ) = m n m i ∑ ∑ bi , j B i =0 j=0 n j ( u) B ( v ) Surfaces Bezier Surface Tensor Product Surfaces Bezier Surface Tensor Product Bezier control net Surfaces Bezier Surface Matrix Form b m,n m n (u,v ) = ∑ ∑ bij Bim (u )B nj (v ) i =0 j =0 n b00 L b0 n B0 (v ) m m M M = B0 (u )LBm (u ) M n bm 0 L bmn Bn (v ) [ ] Surfaces Bezier Surface Properties • Affine invariance • Convex hull • Boundary curve and end-point interpolation • Change in control point position changes surface shape Surfaces Bezier Surface Degree Elevation Degree in u = 2 in v = 3 v u Surfaces Bezier Surface Degree Elevation Degree in u = 3 in v = 3 v u Surfaces Bezier Surface Bicubic Patch Surfaces Bezier Surface Shape Control Surfaces Bezier Surface Derivatives n ∂ m,n ∂ m b (u,v ) = ∑ ∑ bij Bim (u ) B nj (v ) ∂u j =0 ∂u i =0 n m −1 = m ∑ ∑ Ä1,0 bij Bim −1(u )B nj (v ) j =0 i =0 Ä1,0 bij = bi +1 j − bij Surfaces Bezier Surface Derivatives m ∂ n m ∂ m,n n b (u,v ) = ∑ ∑ bij B j (v ) Bi (u ) ∂v i =0 ∂v j =0 m n −1 = n ∑ ∑ Ä0,1bij B nj −1(v )Bim (u ) i =0 j = 0 Ä0,1bij = bij +1 − bij Surfaces Bezier Surface Derivatives Cross Boundary Derivatives b03 b00 b33 Ä0,1b30 b30 Surfaces Bezier Surface Derivatives Normal Vectors ∂ m ,n ∂ m ,n b ( u, v ) × b ( u, v ) ∂v n( u, v ) = ∂u ∂ m ,n ∂ m ,n b ( u, v ) × b ( u, v ) ∂u ∂v n ∂ ∂v ∂ ∂u Surfaces Bezier Surface Derivatives: m −1n −1 ∂ 2 m,n −1 n −1 b (u,v ) = mn ∑ ∑ Ä1,1bi , j J m ( u ) J (v ) j i ∂u∂v i =0 j =0 Geometric Interpretation: bi+1,j+1 Pi , j − bi + 1, j = bi , j +1 − bi , j ∆ ∆11 bi , j = (bi +1 , j + 1 − bi +1 , j ) 11 bi,j+1 − (bi , j + 1 − bi , j ) Pi,j bi,j bi+1,j ∆11 bi , j = (bi +1 , j + 1 − Pi , j ) Twist Vector Surfaces Bezier Surface Composite Patches Surfaces Bezier Surface Composite Patches C0 Continuous Surfaces Bezier Surface Composite Patches C1 Continuous Surfaces Bezier Surface Utah Teapot 32 Bicubic Bezier patches Surfaces B-Spline Surface B-Splines Polynomial spline function of order k (degree k-1) n +1 P (t ) = ∑ Bi Ni ,k (t ) i =1 Bi : Control point Nik : Basis function tmin ≤ t ≤ tmax 2 ≤ k ≤ n +1 Surfaces B-Spline Surface m +1 n +1 P (u,v ) = ∑ ∑ Bij Ni ,p (u ) N j ,q (v ) i =1 j =1 Bij : Control point Nip, Njq : Basis functions Surfaces B-Spline Surface Properties • Affine invariance • Convex hull (stronger) • Change in control point position changes surface shape (local control) Surfaces B-Spline Surface Properties • local control Surfaces B-Spline Surface Examples Surfaces Polygonal Representation For rendering often object is represented as collection of polygons Object Surfaces Polygonal Mesh Surfaces Polygonal Representation Polygonal mesh is a collection of edges, vertices and polygons such that each edge is shared by at most two polygons Edge: Connects two vertices Polygon: Closed sequence of edges Surfaces Polygonal Representation Explicit Representation Each polygon is represented by P=((x1,y1,z1) (x2,y2,z2) … (xn,yn,zn)) i.e. vertices are stored in the order of traversal Edges connect the successive vertices plus the last one This representation has restrictive manipulation and has multiple storage of points. Surfaces Polygonal Representation Pointer to Vertex List V2 Each vertex is stored once in a list V V=((x1,y1,z1) (x2,y2,z2) … (xn,yn,zn)) V1 Each polygon is represented as P=(V1,V2,V3) e.g. P1=(1,2,4) and P2=(4,2,3) V3 P2 P1 V4 In this representation it is difficult to find polygons that share an edge. Surfaces Polygonal Representation Pointer to Edge List V2 Edge: E = (Vi,Vj,Pm,Pn) Polygon=(Ep,Eq,Er) E1 V1 V = (V1,V2,V3,V4) E1 = (V1,V2,P1,null) E2 = (V2,V3,P2,null) E3 = (V3,V4,P2,null) E4 = (V4,V2,P1,P2) E5 = (V4,V1,P1,null) E2 P1 E4 E5 P2 E3 V4 P1= (E1E4E5) P2= (E2E3E4) V3 Surfaces Polygonal Representation Winged Edge Data Structure Edge Vertices Start End Faces Left Right Left Traverse Pred Succ Right Traverse Pred Succ a X Y 1 2 b d e c
© Copyright 2026 Paperzz