Shape Modeling Differential Geometry of Curves and Surfaces I Lecture 3 We begin with “first order properties”, that is properties which depend only on first derivatives. 1. Curves and their tangents A Curve in 3-dimensional space is nearly always represented by parametrization r : I R3, where I is some interval a < t < b of real numbers (a could be – or b could be , or both). Also I could be a circle for parametrizing a closed curve. Writing r(t) = (X(t), Y(t), Z(t)) the curve is regular provided the velocity vector r(t) = (X(t), Y(t), Z(t)) is never the zero vector. (Here the prime stands for d .) The unit tangent vector T(t) is dt the unit vector in the direction of the velocity, namely T(t) = r (t) . || r (t) || Fig. 1. A normal plane and tangent vector of a space curve The denominator, || r ||, called the speed of the curve; unit speed means that || r || = 1 for all t. The curve has a normal plain at any point r(t0), namely the plane through this point perpendicular to the tangent vector. See Figure 1. This plane has equation (x- r(t0)) r(t0) = 0. The arclength s = l(t) of the curve between r(t0) and r(t) is given by t s = l(t) = || r || dt, (2.1) t0 We deduce from the formula that ds = || r ||. In particular if the parameter t is s itself, dt then || r || = 1: using arclength as the parameter, the curve is automatically of unit speed. In order that changing from t to s is valid change of parameter we need to know that ds dt is never zero. Thus every regular curve can be re-parametrized to be unit speed. Example 1. Helix ds = || r || = 2 for all t. ((X + Y + Z) = 2 ) dt Thus s = 2t + constant and, making s = 0 when t = 0, the reparametrized curve s s s R(s) = (cos , sin , ) 2 2 2 is unit speed. Let r(t) = (cos t, sin t, t), which has 2. Surfaces: the parametric form With a surface the matter is quite different. There is no natural concept of “unit speed”. Actually, it is well worth having several representations of a surface available for different purposes. We take a plane – the parameter plane – with coordinates (u,v) and an open and connected region U of this plane. Then we can parametrize a surface by r(u,v) = (X(u,v), Y(u,v), Z(u,v)), where X,Y,Z are functions with sufficiently many continuous derivatives. The condition corresponding to the “regularity” of a space curve is that, for every (u,v) U, the Jacobian matrix Xu Xv Y Y u v Z u Z v should have rank 2. The content of this is that the rank should not drop below 2. If it does drop, the two columns ru and rv are parallel (or zero) as vectors in R3. Note that ru and rv are parallel (or zero) ru rv = 0. In fact ru, evaluated at (u,v0), is the tangent vector to the space curve r(u,v0), where v has a fixed value v0, and similarly rv is the tangent vector to the space curve r(u0,v). When the Jacobian matrix always has rank 2, i.e. ru rv is never the zero vector, we say that the map r is an immersion, and that r defines an immersion surface. Namely M = r(U). The surface M has a tangent plane at r(u,v) spanned by the vectors ru rv. All surfaces will be assumed immersed unless the contrary is stated. Fig 2. Surface normal and tangent vectors ru , rv. The normal to the tangent plane is also called the normal to the surface and is in the direction ru rv. See Figure 2. The unit surface normal n determined by the ordering u,v of the parameters is n= ru rv || ru rv || Example 2. Sphere A sphere, radius , minus the north and south poles, can be parametrized by spherical polar coordinates as r( , ) = ( cos cos, cos sin, sin ) where -/2 < < /2, 0 < < 2. See Figure 3. Fig. 3. Cut away picture of (latitude) and (longitude) coordinates on the sphere minus north and south poles. The tangent vectors and unit normal are sin cos r = sin sin r = cos cos sin cos cos n = 0 cos cos cos sin sin Example 3. Cylinder A cylinder, radius , with axis along the z-axis, can be parametrized by cylindrical polar coordinates as r( , z) = ( cos, sin, z). ( covers a whole circle.) The tangent vectors and unit normal are sin r = cos rz = 0 0 0 n = 1 cos sin 0 The normal is orthogonal to the cylinder’s axis. Example 4. A non-surface Let r( u, v) = (u+2v, 2u+4v, 3u+6v). Although r is parametrized by two parameters, the tangent vectors 1 ru = 2 rv = 3 2 4 6 are parallel, so a surface normal is undefined. In fact this r gives a curve – indeed a straight line – not a surface. Example 5. Almost an immersed surface: the crosscap A less drastic failure – which we include here simply to show what the immersion definition allows – is r( u, v) = (u, v2, uv). Here, ru = (1,0,v)t, rv = (0,2v,u)t , and these are parallel iff (if and only if) u = v = 0. So excluding the origin (0,0) from the parameter plane, r gives an immersed surface. See Figure 4. Fig 4. A crosscap, showing the the normals to the two sheets at a point along the selfintersection line. The surface is called a “crosscap” or “Whitney umbrella” and has a line of selfintersection corresponding to u = 0: we have r(0,v) = r(0,-v) = for all v. Thus at points (0, v2,0) (v0) there are two normals, corresponding to the two “sheets” of the surface which cross at that point. Note that the two parameter points (0, v) and (0, -v) are distinct, for v0. This means that each different parameter point (u, v) does give a different tangent plane. Example 6. Surface of revolution Let p(t) = (X(t), Y(t)) be a regular plane curve, which we place in the x,y-plane of x,y,zspace. We assume that the curve does not cross the x-axis, and rotate about this axis to give the surface r(t,) = (X(t), Y(t)cos, Y(t)sin), where is an angle parameter covering a whole circle. The vectors rt = (X, Ycos, Ysin) and r = (0, -Ysin, Ycos) are independent since Y is never zero and X,Y are never both zero, so the surfage is immersed and has a well-defined tangent plane at each point, spanned by rt and r. Fig 5. A torus generated by rotating a circle about a line (the x-axis) in space. For example, taking p(t) = cos (t), sin (t + 2), which is a circle of radius 1 centered at (0,2,0) in 3-space, the surface is a torus. See Figure 5. 3. Monge form In the Monge form (named after Gaspard Monge, 1746-1818) the surface is written as the graph of function: z = f(x,y). We can regard the Monge form as a special kind of parametrization: r(x,y) = (x, y, f(x,y)), rx = (1, 0, fx), ry = (0, 1, fy). Note that rx ry is never 0, so that r is always immersion. We have n~ = rx ry = (-fx, - fy, 1); 1 unit normal n = (-fx, - fy, 1) . 2 f x f 2y 1 Often, a special Monge form in which, at x = y = 0, f, fx and fy are all zero is used. Then non-unit normal at x = y = 0 the normal is (0,0,1) and the tangent plane to the surface at the origin is the x,y-plane. See Figure 6. In that case the equation of the surface can be written in the “special” Monge form” z= 1 1 (a20x2 + 2a11xy + a02y2) + ( a30x3 + 3a21x2y + 3a12xy2 + a03y3) + … 6 2 Binomial denominators 2 = 2!, 6 = 3! are inserted here, and coefficients are named to reflect the powers of x and y in the terms of the Taylor expansion. Fig. 6. A Monge patch in which the tangent plane at one point is the plane z = 0. Example 7. Monge form of a sphere A sphere of radius > 0 centered at (0, 0, ) is tangent to the x,y-plane at the origin. The equation is x2 + y2 + (z - )2 = 2; if we want the part of the sphere near the origin we must take the negative square root when finding z, to give z = - ( 2 - x2 - y2 ). Thus the Monge form starts out with z= 1 2 1 (x + y2) + ( x4 + 2x2y2 + y4) + … 3 2 8 Notice that in this case, which is typical, the Monge form does not give us the whole sohere. In fact just the sphere below the equator will be covered. See Figure 7. Fig. 7. Monge patch for a sphere. 4. Implicit form The Monge form, or indeed any graph z = f(x,y), is a special case of a surface given “implicitly” by an equation F(x,y,z) = 0. This the most “global” of the three representations. A unit sphere centered at the origin is given completely by the equation x2 + y2 + z2 - 1 = 0, for example. But the implicit form is the hardest to handle. The normal vector is easy to obtain, however: it is along the gradient of the function F, that is along (Fx, Fy, Fz). The condition, that F, Fx, Fy, Fz are never all zero at the same point (x,y,z) is also expressed by saying that 0 is a “regular value” of the function F. The equation of the tangent plane at (x0, y0, z0) , where F(x0, y0,z0) = 0, is (x - x0)Fx + (y - y0)Fy+ (z - z0)Fz = 0. Example 8. Quadric surfaces A Quadric surface M is a surface in x,y,z-space given by an equation containing only terms of degree 0,1 and 2 in the variables x,y and z. When M is a quadratic surface it can be represented as XtQX = 0 where X is a 4-vector, X = (x,y,z,1) t, and Q is a 44 symmetric matrix. The matrix Q is partitioned as Q3 q t , q Q 44 where Q3 is a 33 matrix, q a 31 column vector and Q44 is a real number. For a Q= quadric centered at (0,0,0) we have q = 0. The contour generator of any surface M relative to a point c in space is the curve of points on M where the tangent plane passes through c. Definition 1. Polar plane The equation XtQC = 0, being linear in x,y,z, defines a plane. This plain is called the polar plane of c with respect to the quadric. See Figure 8. Fig. 8. Polar plane of a quadric surface with respect to a point outside it. When the quadric is nonsingular and c is outside, the polar plane contains the points of contact of the cone of rays through c tangent to the quadric – the “contour generator” for point c. For a sphere of radius a centered at (0,0,b) the quadric matrix has the form 1 0 0 0 0 1 0 0 Q= , 0 0 1 b 0 0 b b2 a2 For which XtQX = x2 + y2 + (z - b )2 - a2. The polar plane of the origin is the plane XtQ(0,0,0,1) t = 0, that is the plane z = (b2 - a2 )/b. If b = a we obtain the tangent plane at the origin, the plane z = 0. Let us show the above property of the polar plane. Taking x = (x,y,z) t on the quadric, any point on the line l joining x to c is (writing c as a column vector) v = c + (1-) x. Let V be the column 4-vector (v t,1) t, so that we have V = C + (1-) X. The condition for v to lie on the quadric, namely VtQV = 0, gives a quadratic equation for : ( Ct + (1-) Xt) Q ( C + (1-) X) = 0. When this quadratic equation is multiplied out, there are three terms, involving 2, and a constant term. The constant term Xt Q X = 0 by definition of x, since x lies on the quadric. Thus one solution of the quadratic equation is = 0. The coefficient of is 2(Xt Q C). References [1] R. Gipolla and P.Gibin, Visual Motion of Curves and Surfaces, Cambrid University Press, 2000 [2] E.Kreyszig,DifferentialGeometry,DoverPublication,Inc, 1991 [2] I.D. Faux and M.J. Pratt,Computational Geometry for Design and Manufacture,John Wiley & Sons,Inc, 1980