Surfaces ¤ Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:1 東吳資訊科學 江清水 Surfaces of Revolution A very simple family of surfaces is obtained by rotating a plane curve around an axis. For example, let C(t) be a curve on XZ Plane, a surface can be generated by rotating C(t) about Z-axis. Any point on the surface of revolution is a function of two parameters, t and . The parameter t describes the entity to be rotated, and is the angle of rotation around the Z-axis. So, C(t) = [x(t), 0, z(t)] S(t,) = [x(t)cos , x(t)sin , z(t)] In matrix form: / \ S(t,) = [x(t) 0 z(t) 1] | | \ / 11.4 Surfaces Page:2 東吳資訊科學 江清水 Surface of revolution generated by: (Assume the curve are on the firsst quadrant of the XZ plane) (a) line segment parallel to Z-axis (Cylinder). (b) line segment which is not parallel to Z-axis (truncated cone). (c) line setment parallel to X-axis (Hollowed disc). (d) a circle (torus). (e) cubic Bezier curve. (f) others. 11.2, 11.3(a),(b), 11.5, 11.6 Picture from Anand's book. Surfaces Page:3 東吳資訊科學 江清水 6.1 Cylindrical surface of revolution. (a) Schematic; (b) result. 6.2 Conical surface of revolution. (a) Schematic; (b) result. 6.3 A disc as surface of revolution. (a) Schematic; (b) result. Surfaces Page:4 東吳資訊科學 江清水 6.4 A surface of revolution from a closed polygon. (a) Schematic; (b) result. 6.5 Biparametric surface of revolution. 6.8 Surfaces of revolution. (a) Paraboloid; (b) hyperboloid. Surfaces Page:5 東吳資訊科學 江清水 6.7 Tori. (a) Circular cross section; (b) elliptical cross section. 6.9 Parabolically blended surface of revolution. (a) Generating curve; (b) surface. Surfaces Page:6 東吳資訊科學 江清水 6.10 B-spline surface of revolution. (a) Polygon vertices; (b) B-spline curves; (c) surface. Picture from Rogers and Adams' book. Surfaces Page:7 東吳資訊科學 江清水 Example: Generate the surface obtained by rotation of the line segment AB with A=(1,0,1) and B=(3,0,1) around the Zaxis. Y X Z What the surface look alike if the line segment AB intersect the Z-axis? Y X Z Surfaces Page:8 東吳資訊科學 江清水 Example: Generate the surface obtained by rotation of a circle contained in XZ plane around the Z-axis. The center of the circle has coordinates (a,0,0) and the radius of the circle is r (a > r). Y X Z What the surface look alike if a <= r? What the surface look alike if the circle centered at the origin. Surfaces Page:9 東吳資訊科學 江清水 For any curve C(t) on XZ plane, the surface of revolution is represented in matrix form as: / cos sin 0 0 \ S(t,) = [C(t) 1] | 0 0 0 0 | | 0 0 1 0 | \ 0 0 0 1/ Example: Consider the surface of revplution generated by a cubic Bezier curve defined by the control points P1=(1,0,2), P2=(3,0,4), P3=(2,0,6), P4=(5,0,7) rotating about the Z-axis. Calculate the point on the surface at t=0.5, =/4. Surfaces Page:10 東吳資訊科學 江清水 How to rotated a parametric curve about an arbitrary axis? 6.11 and 6.12 Picture from Rogers and Adams' book. Surfaces Page:11 東吳資訊科學 江清水 Surfaces • Surfaces of revolution ¤ Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:12 東吳資訊科學 江清水 Sweep Surface A sweep surface is obtained by traversing an entity, e.g., a line, polygon, or curve, along a path in space. The sweep surface is represented in parametric form as: S(t,s) = C(t)T(s) where C(t) is the parametric equation of the line or curve and T(s) is the sweep transformation based on the shape of the path. 11.7 Translational sweep and rotational sweep. Picture from Anand's book. Surfaces Page:13 東吳資訊科學 江清水 If the path is a straight line starting at the origin along the Z-axis, what T(s) looks alike? T(s) = If the path is a straight line starting at the origin, and the path can be represented in parametric form as [X(s) Y(s) Z(s)] = [as bs cs], what T(s) looks alike? T(s) = If the path is an origin-centered circle in a z=constant plane, what T(s) looks alike? T(s) = Surfaces Page:14 東吳資訊科學 江清水 Example: Sweep the normalized cubic spline curve segment defined by P1 = (0,3,0), P2 = (3,0,0), P1' = [3 0 0], P2' = [3 0 0] 10 units along the z-axis. 6.14 From Rogers and Adams' book. Surfaces Page:15 東吳資訊科學 江清水 Example: Consider the line segment in the XY plane and parallel to the y-axis defined by end points P1=(0,0,0) and P2=(0,3,0). Determine the point at t=0.5, s=0.5 on the sweep surface generated by simultaneously translating the line 10 units along the axis and rotating it through 2 about the x-axis. 6.13 From Roger and Adams' book. Surfaces Page:16 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces ¤ Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:17 東吳資訊科學 江清水 Parametric Surfaces The simplest mathematical element we use to model a surface is a patch. A patch is a curve bounded collection of points whose coordinates are given by continuous, two-parameter, single-valued mathematical function of the form: (0 <= s,t <= 1) S(s,t) = [x(s,t), y(s,t), z(s,t)] The following surface is created by a mesh of curve along the s and t parametric directions. t 1 11.1 anand s 0 1 Compare with the definition for curve segment: (0 <= t <= 1) C(1) C(t) = [x(t), y(t)] 0 t 1 Surfaces C(0) Page:18 東吳資訊科學 江清水 Example: Find the surface patch for the rectangular segment of the X-Y plane with (a,b,0), (a,d,0),(c,b,0) and (c,d,0) as vertices. Y t=1 d s=0 s=1 b t=0 a c Example: Find the parametrize respresentation for the sphere centered at (a,b,c) with radius r. (From Mortenson's book) 3.3 Surfaces Page:19 東吳資訊科學 江清水 X We have the following questions for the parametric form of surface patches: 1. How to find the normal of the surface patch at a point? Why we want find the suface normal? 2. How to display the surface patch? 3. Is it possible to have degenerate patches? If yes, give examples for the degenerate patches corresponding to a point and a line. Surfaces Page:20 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces ¤ Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:21 東吳資訊科學 江清水 Quadirc Surfaces The natural quadric surfaces, the sphere, cone, cylinder, ellipsoid, paraboloid of revolution and the hyperboloid of revolution, are also surfaces of revolution. These natural quadric surfaces, especially the sphere, cone and cylinder, play an important part in the manufacture of mechanical parts. Given the examples of physical object whose shape has part of natural quadric surfaces. • • • • basketball --------------funnels ------------------beer cans --------------satellite antennas ----- There are two methods for representing quadric surfaces, algebraically and geometrically. Surfaces Page:22 東吳資訊科學 江清水 Algebraic Descriptions of Quadirc Surfaces: The general quadric surface is given by: a200x2+a020y2+a002z2+a110xy+a011yz+a011xy+ a100x+a010y+a001z+a000=0 This general quadric equation can be written in matrix form as [X][A][X]T = 0 where [X] = [x y z 1] [A] = Let's try to eliminate the linear tems. Assume a translation can eliminate the linear terms. After the translation, the matrix form becomes: [X][Tr][A][Tr]T[X]T = [X][A'][X]T = 0 where the translation matrix is: [Tr] = Surfaces Page:23 東吳資訊科學 江清水 The transformed matrix [A'] is: [A'] = Eliminating the linear terms, yields [M][L] = [G] where [M] = [L] = [G] = Surfaces Page:24 東吳資訊科學 江清水 If [L] is invertible, a solution exists and the quadric is central (sphere, cone, cylinder, ellipsoid, or hyperboloid). Otherwise, the quadric is noncentral (paraboloid). Let's extend the idea we have learned in conics and assume that: If del[L]>0, then the quadric is ellipsoid. If del[L]=0, then the quadric is paraboloid. If del[L]>0, then the quadric is hyperboloid. What's wrong with this assumption? Hint: f(x,y,z) and -f(x,y,z) should represent the same surface, but their corresponding del[L] have different sign. Surfaces Page:25 東吳資訊科學 江清水 How can we determine whether a quadric is a ellipsoid, paraboloid, or hyperboloid? Surfaces Page:26 東吳資訊科學 江清水 As with the conic sections whether [L] is singular or not, the axes of a quadric can be made parallel to the coordinate axes by rotation. Here, three rotations are required, two to make one of the axes of the quadric parallel to a coordinate axis and a final rotation about the axis to make the other two axes of the quadric parallel to the other coordinate axes. Now, a110, a101 and a011 will be zero. Similarly, if the quadric is noncentral, i.e., a paraboloid, as mentioned previously the linear terms cannot all be eliminated. However, two of the three linear terms can be eliminated. The result of these operations is to place the quadric in the standard form. For the central quadric the standard form is with the center at the origin and the axis aliged with the coordinate axes. In matrix form the result standard form equation is: [X][A][X]T = 0 where [A] = Surfaces Page:27 東吳資訊科學 江清水 Quadric Surfaces Fig 6-18 Rogers from Rogers Surfaces Page:28 東吳資訊科學 江清水 Example: Transform the following quadric into standard form and determine the type of the quadric: 2xy - x - y + z = 0 Surfaces Page:29 東吳資訊科學 江清水 Geometric Descriptions of Quadric Surfaces: Every quadric surface is represented by a point, two orthogonal (unit) vectors and three scalars. The point, either center or vertex, fix the location of the surface. The vectors and their cross product determine its axes or orientation. The scalars determine its dimensions or size. How to represent each quadric surfaces? point vectors scalars Ellipsoid Hyperboloid of one sheet Hyperboloid of two sheets Elliptic paraboloid Hyperbolic paraboloid Elliptic cone Sphere Right circular cylinder Right circular cone Surfaces Page:30 東吳資訊科學 江清水 Let's consider a surface patches S which has boundary curves Cs0,Cs1,C0t ,C1t, and coner points P00, P10, P01, P11, as shown in the following picture. p11 Cs1 p01 C0t S C1t p00 Cs0 p10 There are infinite many surfaces S for given coner points and/or boundary curves. We have to specify the way to construct the unknown information such as the interior of the surface. Different ways of constructing the unknown parts produce different surfaces. Notice that we need two parameters for surfaces S(s,t) and one parameter for curves Cs0(t), Cs1(t),C0t(s) and C1t(s). Surfaces Page:31 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces ¤ Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:32 東吳資訊科學 江清水 Bilinear Surfaces A bilinear surface is constructed from the four corner points of the unit square in parametric space. Any point in the interior of the surface is specified by linearly interpolating between opposite boundaries of the unit square domain. p11 p01 S t (1,1) p00 (0,1) s (0,0) p10 (1,0) The linear interpolation between the points P00 and P10 is: Cs0(s) = S(s,0) = sP10+(1-s)P00 The linear interpolation between the points P01 and P11 is: Cs1(s) = S(s,1)=sP11+(1-s)P01 So, the surface S(s,t) can be generate by: Surfaces Page:33 東吳資訊科學 江清水 In matrix form: S(s,t) = [ ] [ ][ ] Verify that S(i,j)=Pij for i,j {0,1} . Example: (1) Draw the picture for the bilinear surface whose coner points are P00=(0,0,0), P10=(0,1,1), P01=(1,0,1) and P11=(1,1,0). (2) Determine the point on the bilinear surface corresponding to s=t=1/2 in parametric space. (3) What kind of the surface it is? Y X Z Surfaces Page:34 東吳資訊科學 江清水 Example: Derive the bilinear surface patch for the hyperboloid paraboloid: z=(x2/a2)-(y2/b2), -a<=x<=a and -b<=y<= b Y X Z Surfaces Page:35 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface ¤ Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:36 東吳資訊科學 江清水 Ruled Surfaces A ruled surface is obtained by linearly interpolating between two known boundary curves associated with the opposite side of the unit square in parametric space. Let Cs0 and Cs1 are two known boundary curves and S(s,0)=Cs0(s),S(s,1)=Cs1(s), the ruled surface is given by: S(s,t) = (1-t)Cs0(s)+tCs1(s) or S(s,t) = [1-t t] [ ] Alternatively, the curves C0t and C1t are known and S(0,t)=C0t(t), S(1,t)=C1t(t), the ruled surface is given by: S(s,t) = or S(s,t) = [ Surfaces ] [ ] Page:37 東吳資訊科學 江清水 Example: You are hired by a company and your first assignment has to design a basket which has a square bottom with a circular top. Can you design this basket for the company? Y X (r,0,0) (l,0,h) Z Notice how the bottom square, which contains cusps, is smoothly blended into the continuous top circle. Surfaces Page:38 東吳資訊科學 江清水 Example: you are fired by the basket company and find a new job for an airplane company. The manager think you are experienced designer and ask you to design the shape for aircraft wings. How to do it? Surfaces Page:39 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface ¤ Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:40 東吳資訊科學 江清水 Linear Coons Surface If the four boundary curves Cs0,Cs1,C0t and C1t are known, a linear coons surface is obtained by bilinear interpolate the interior of the surface patch. Let the surface be defined by: S(s,t) = (1-t)Cs0(s)+tCs1(s)+(1-s)C0t(t)+sC1t(t) Let's check the boundary curves S(s,0) and the corner point S(0,0) of the surface S: S(s,0) = S(0,0) = What is wrong with the surface? We have to modify the definition to satisfied the following condition: for i,j in {0,1}, S(i,j) = Pij and S(s,j) = Csj(s) and S(i,t) = Cit(t) So, the correct definition for linear Coons surface is: S(s,t) = Surfaces Page:41 東吳資訊科學 江清水 In matrix form, the surface is defined by: S(s,t) = or more compactly as: S(s,t) = The functions (1-t),t,(1-s), and s are called blending functions because they blend the boundary curves to produce the internal shape of the surface. The linear Coons surface is the simplest of the Coons surfaces. A more general Coons surface will be discussed in the future. Surfaces Page:42 東吳資訊科學 江清水 Example: Find the point on a linear Coons surface at s=t=0.5 when the four boundary curves are given by open thirdorder (k=3) B-spline curves defined by: (Points for each B-spline curves are in order). Cs0: [0 0 0] [1 1 0] [2 1 0] [3 0 0] [3 0 3] Cs1: [0 0 3] [1 1 3] [2 1 3] [2 1 3] C0t: [0 0 3] [0 1 2] [0 1 1] [0 0 0] C1t: [3 0 3] [3 1 2] [3 1 2] [3 1 1] [3 0 0] Fig 6-30 from Rogers Surfaces Page:43 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface ¤ Coons bicubic surface • Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:44 東吳資訊科學 江清水 Coons Bicubic Surface The reason to use the Coons bicubic surface --- flexibility. The Coons bicubic surface patch uses normalize cubic splines for all four boundary curves. Cubic blending functions are used to define the interior of the patch. Cs1(s) p11 p01 C0t(t) p00 Surfaces Cs0(s) S(s,t) C1t(t) p10 Page:45 東吳資訊科學 江清水 Thus, the four boundary curves are: S(s,0) = Cs0(s) = [S][N][ ]T S(s,1) = Cs1(s) = [S][N][ ]T S(0,t) = C0t(t) = [ ][N]T[T]T S(1,t) = C1t(t) = [ ][N]T[T]T where [S] = [s3 s2 s 1], [T] = [t3 t2 t 1] 2 -2 1 1 [N] = -3 3 -2 -1 0 0 1 0 1 0 0 0 The cubic blending function used for both parametric directions is: [F] = [F1(s) F2(s) F3(s) F4(s)] = [S] [N] or [F]T = [F1(t) F2(t) F3(t) F4(t)]T = [N]T[T]T Surfaces Page:46 東吳資訊科學 江清水 The definition for a Coons bicubic patch is: S(s,t) = [F1(s) F2(s) F3(s) F4(s)][Pc] [F1(t) F2(t) F3(t) F4(t)]T = [S][N][Pc][N]T[T]T where [Pc] = What informations does the [P] matrix contains? Surfaces Page:47 東吳資訊科學 江清水 The parametric derivative at any point on a bicubic surface are obtained by: Ss(s,t) = [S'][N][Pc][N]T[T]T St(s,t) = [S][N][Pc][N]T[T']T Sst(s,t) = [S'][N][Pc][N]T[T']T Sss(s,t) = [S''][N][Pc][N]T[T]T Stt(s,t) = [S][N][Pc][N]T[T'']T where [S'] = [ ], [S''] = [ ] [T'] = [ ], [T''] = [ ] How to find the normal of the bicubic surface? One of the difficulities in using bicubic surface patches is the disparate magnitudes of position, tangent and twist vectors. Surfaces Page:48 東吳資訊科學 江清水 Example: The Coons bicubic surface S has the following geometric information: (1) position vectors P00=[-100 0 100] P10=[100 -100 100] (2) tangent vectors Cs0s(0)=[100 100 0] Cs1s(0)=[1 -1 0] C0tt(0)=[0 10 -10] C1tt(0)=[0 1 -1] (3) twist vectors Sst(0,0)=[0 0 0] Sst(1,0)=[0.1 -0.1 -0.1] P01=[ -100 -100 -100] P11=[100 0 -100] Cs0s(1)=[1 1 0] Cs1s(1)=[1 -1 0] C0tt(1)=[0 -1 -1] C1tt(1)=[0 -1 -1] Sst(0,1)=[0.1 0.1 0.1] Sst(1,1)=[0 0 0] Find the normal vector at s=t=1/2. Surfaces Page:49 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface ¤ Bezier surface • B-spline surface • Rational B-spline surface Surfaces Page:50 東吳資訊科學 江清水 Bezier Surfaces A Cartesian (tensor product) Bezier surface is given by: S(s,t) = i=0mj=0nPi,jBm,i(s)Bn,j(t) where Bm,i(s) and Bn,j(t) are the Bernstein basis functions in the s and t parametric directions. That is: Bm,i(s) = Bn,j(t) = The Bi,j's are the control points for the Bezier surface. The (m+1)x(n+1) control points define a polygon net. The Bezier surfaces can be represented by matrix form: S(s,t) = [S][B(m)][Pb][B(n)][T]T where [S] = [s3 s2 s 1], [T] = [t3 t2 t 1] [Pb]= [B(m)]= mxm Surfaces Page:51 東吳資訊科學 江清水 The properities of the Bezier curve: (1) The degree of the surface in each parametric direction: m-1 and n-1. (2) Convex hull property: The surface is contained within the convex hull of the defining polygon net. (3) End points interpolation: The surface passing through the corner points of the defining polygon net. (4) The surface is invariant under an affine transformation. (5) The surface generally follows the shape of the defining polygon net. The user can control the shape of the surface patch without an intimate knowledge of tangent or twist vector. (6) Each boundary curves of the Bezier surface is a Bezier curve. (7) Tangent vectors at the corner: (8) Continuity at the corner points and boundary curves: Surfaces Page:52 東吳資訊科學 江清水 Consider the extension of (6), given a specific value t0, where 0 <= t0 <= 1. Intitively, the curve S(s,t0) should be a Bezier curve. Find the control points for the curve. Prove that the control points for the curve S(s,0) and S(s,1) are Pi,0 and Pi,n, 0<=i<=m, respectively. Surfaces Page:53 東吳資訊科學 江清水 The relationship between a bicubic Bezier and a bicubic Coons surface is: SCoons(s,t) = SBezier(s,t) That is: [S][N][Pc][N]T[T]T = [S][B(3)][Pb][B(3)][T]T So, [Pc] = [Pb] = Example: From the above equation, find the relation for the control points of SBezier and the geometric properities of SCoons. Surfaces Page:54 東吳資訊科學 江清水 Example: Consider a plane patch on z=0, its Bezier control points are: Pi,j = [i j 0] (1) Find [Pb]. (2) Find [Pc]. (3) Let's change the point P3,3 to [3,3,3], find new [Pb] and [Pc]. Surfaces Page:55 東吳資訊科學 江清水 The parametric derivative at any point on a bicubic surface are obtained by: Ss(s,t) = [S'][N][Pc][N]T[T]T St(s,t) = [S][N][Pc][N]T[T']T Sst(s,t) = [S'][N][Pc][N]T[T']T Sss(s,t) = [S''][N][Pc][N]T[T]T Stt(s,t) = [S][N][Pc][N]T[T'']T where [S'] = [ ], [S''] = [ ] [T'] = [ ], [T''] = [ ] How to find the normal of the bicubic surface? One of the difficulities in using bicubic surface patches is the disparate magnitudes of position, tangent and twist vectors. Surfaces Page:56 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface ¤ B-spline surface • Rational B-spline surface Surfaces Page:57 東吳資訊科學 江清水 Surfaces • Surfaces of revolution • Sweep surfaces • Parametric surfaces • Quadric surfaces • Bilinear surface • Ruled surface • Linear Coons surface • Coons bicubic surface • Bezier surface • B-spline surface ¤ Rational B-spline surface Surfaces Page:58 東吳資訊科學 江清水