Computer Aided Geometric Design Gershon Elber Technion based
Computer Aided Geometric Design ©Gershon Elber, Technion based on a book by Cohen, Riesenfeld, & Elber 06/03/2021 © Gershon Elber, Technion 1
Definition 3. 1 (The Circle) Given a point C in a plane and a number R 0, the circle with center C and radius R is defined as the set of all points in the plane at distance R from the y point C. In set notation we write, { P = (x, y) : || P - C|| = R } 06/03/2021 © Gershon Elber, Technion R C x 2
Definition 3. 2 (The Ellipse) y Given two points, F 1 and F 2 P called the foci and a number defined as the set of all points || P || -F 2 F 1 || ||P - F 1 K || F 1 - F 2 ||, an ellipse is F 2 x the sum of whose distances from the foci K. That is, { P = (x, y) : || P - F 1|| + || P - F 2|| = K }. 06/03/2021 © Gershon Elber, Technion 3
The Ellipse The axis containing the foci is called the major axis of the ellipse and the axis orthogonal to the major axis through the center, C = (F 1 + F 2) / 2, is denoted the minor axis. If center C is at some location C = (cx, cy) the ellipse equals, 06/03/2021 © Gershon Elber, Technion 4
Definition 3. 3 (The Hyperbola) y defined as the set of all points || F 2 F 1|| K � 0, a hyperbola is || P P ||P - Given two points, F 1 and F 2 called the foci and a number F 2 x the difference of whose distances from the foci K. That is, { P = (x, y) : || P - F 1|| - || P - F 2|| = �K }. Question: Question What if K = 0 ? 06/03/2021 © Gershon Elber, Technion 5
The Hyperbola The axis containing the foci is called the major axis of the hyperbola and the axis orthogonal to the major axis through the center, C = (F 1 + F 2) / 2, is denoted the minor axis. If center C is at some location C = (cx, cy) the hyperbola equals, 06/03/2021 © Gershon Elber, Technion 6
Definition 3. 4 (The Parabola) Given a fixed point F called the focus and a fixed line y called the directrix, the set of points equidistant (bisector) from F and F the directrix is called a parabola. 06/03/2021 x Directrix © Gershon Elber, Technion 7
x = -c The Parabola (c, 0) Let the directrix be the line x = -c and assume F = (c, 0). Then, and by squaring the expression, 06/03/2021 © Gershon Elber, Technion 8
Conic Sections z Consider the cone z 2 = m 2(x 2 + y 2 ), where m is a real number. Question: Question What is the affect of m? y x Question: Question What is the shape of a Plane-Cone intersection? 06/03/2021 © Gershon Elber, Technion 9
z 2 = m 2(x 2 + y 2 ) Conic Sections z Consider the plane x = k. Then, z 2 = m 2(k 2 + y 2 ), or y 2 = z 2 / m 2 - k 2. If k = 0, z = �m y , or Two Lines. x=k x y , or a Hyperbola. k � 0, Question: Question What are the foci of the hyperbola? 06/03/2021 © Gershon Elber, Technion x=k 10
z 2 = m 2(x 2 + y 2 ) Conic Sections z z=b Consider the plane z = b. Then, b 2/m 2 = x 2 + y 2, or a circle. Question: Question What if b = 0? 06/03/2021 y © Gershon Elber, Technion x 11
z 2 = m 2(x 2 + y 2 ) Conic Sections z Consider the plane z = ax + b, a � 0. Then, b + ax z= y x or, 06/03/2021 © Gershon Elber, Technion 12
Conic Sections z If a = �m, then the intersection curve equals or, + ax y z= x a Parabola. Question: Question What if b = 0? 06/03/2021 © Gershon Elber, Technion 13 b
Conic Sections z If a 2 < m 2 then let r 2=m 2 - a 2 and b ax+ z= and by completing the square, 06/03/2021 © Gershon Elber, Technion y x 14
Conic Sections z Multiplying by r 2 = m 2 - a 2, b ax+ z= 2 y 2 and dividing by b m , x we get an Ellipse. 06/03/2021 © Gershon Elber, Technion 15
Conic Sections b + x a = z z If a 2 > m 2 then let r 2=a 2 -m 2 and y x and by multiplying by r 2, 06/03/2021 © Gershon Elber, Technion 16
Conic Sections b + ax z= If b = 0, either x = �my or we have crossing lines. Otherwise, b � 0, divide by b 2 m 2, z y x a Hyperbola. 06/03/2021 © Gershon Elber, Technion 17
Implicit Quadratic Functions as Conics We have seen that all conic sections are quadratic implicit forms. Question: Question Are all quadratic implicit forms conic sections? 06/03/2021 © Gershon Elber, Technion 18
Implicit Quadratic Functions as Conics Consider the general quadratic implicit form of Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0. Question: Question Is there a change of basis from (x, y) to (x’, y’ ) such that the same graph is drawn by the curve, 2 2 A’x’ + C’y’ + D’x’ + E’y’ + F’ = 0? 06/03/2021 © Gershon Elber, Technion 19
Definition 3. 7 For the quadratic equation: Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0, 2 the quantity B - 4 AC, is called the discriminant. Theorem 3. 8 The discriminant is invariant under rotations. 06/03/2021 © Gershon Elber, Technion 20
Theorem 3. 9 Every implicit quadratic is a conic section and Proof Since the discriminant is invariant under rotations, rotate through the special angle �so that B’= 0 in the new rotated coordinate system. Then, 06/03/2021 © Gershon Elber, Technion 21
Theorem 3. 10 An implicit function f (x, y) = 0 is a conic section if and only if f is a second degree polynomial in x and y. Question: Question How can we intuitively construct conic sections? 06/03/2021 © Gershon Elber, Technion 22
5 Points Construction Question: Question How many degrees of freedom does the quadratic equation of Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0 have? These degrees of freedom can be prescribed using five points (xi, yi): 06/03/2021 © Gershon Elber, Technion 23
5 Points Construction (Cont. ) Or in matrix form, (x 2, y 2) (x 5, y 5) (x 1, y 1) (x 3, y 3) (x 4, y 4) Questions: Questions What is missing here? 06/03/2021 © Gershon Elber, Technion 24
5 Points Construction (Cont. ) Seeking a more intuitive approach, consider the four lines through the four given points, L 1 through P 1 and P 2 L 2 through P 3 and P 4 L 3 through P 2 and P 3 L 4 through P 4 and P 1 06/03/2021 L 2 P 2 L 3 L 1 P 3 P 4 L 4 P 1 © Gershon Elber, Technion 25
5 Points Construction (Cont. ) Let Li(x, y) = aix + biy + ci. Then, L 2 P 2 L 3 L 1 P 3 P 4 L 4 P 1 06/03/2021 © Gershon Elber, Technion 26
5 Points Construction (Cont. ) Let Li(x, y) Lj(x, y) = (aix + biy + ci) (ajx + bjy + cj). Observation: Observation Li(x, y) Lj(x, y) is a quadratic equation in x and y. Observation: Observation L 1 L 2 (Pj ), j = 1, 2, 3, 4 equal zero! Now consider the surface (c constant), Question: Question To what is f (Pj ), j = 1, 2, 3, 4 equal? 06/03/2021 © Gershon Elber, Technion 27
5 Points Construction (Cont. ) Question: Question How can we prescribe c? L 2 L 1 Define a fifth point, P 5, and ensure that P 2 L 3 P 4 L 4 P 1 or, P 5 06/03/2021 © Gershon Elber, Technion 28
Using Tangents Let L 3 �L 4 and hence f (x, y) = L 1 L 2 + c L 3 2 T Question: Question What does the shape of f (x, y) look like? P 5 L 3=L 4 P 5 is denoted the shoulder point: P =P M = (P 1+P 4) / 2, and the �-conic equals �=��P 5 - M ��/ ��T - M ��. 1 06/03/2021 L 2 © Gershon Elber, Technion 2 P 3=P 4 M 29
Using Tangents P 5 = (1 - �) M + �T. Then T the conic is a P 5 L 3=L 4 P 1=P 2 06/03/2021 © Gershon Elber, Technion L 1 L 2 P 3=P 4 M 30
Conic Arcs as Rational Functions Assume T, P 1, and P 2 are not on the same line. Then, {U = P 1 - T, V = P 2 - T } spans the XY plane. Every point in the XY plane can be written as (u, v) = T + u(P 1 - T) + v(P 2 - T). U=0, V=1 T x 0 = Tx+u (P 1, x -Tx)+v (P 2, x -Tx), y 0 = Ty+u (P 1, y -Ty)+v (P 2, y -Ty). 06/03/2021 © Gershon Elber, Technion V U +V =1 Question: Question Is this coordinate system rigid-motion invariant? P 2 P 1 U U=1, V=0 31
Conic Arcs as Rational Functions U=0, V=1 P 2 __________________ V L 2 ___________ T L 1 : v = 0, L 2 : u = 0, L 3 : u + v - 1 = 0. L 1 L 3 U +V =1 Question: Question What are the (u, v) coordinates of the T P 1 line? The T P 2 line? The P 1 P 2 line? P 1 U=1, V=0 U L 1 : T + u (P 1 - T ) = (1 -u) T + u P 1 , L 2 : T + v (P 2 - T ) = (1 -v) T + v P 2 , L 3 : T + u (P 1 - T ) + (1 -u) (P 2 - T ) = u P 1 + (1 -u) P 2. 06/03/2021 © Gershon Elber, Technion 32
Conic Arcs as Rational Functions In u v coordinates we have 2 0 = L 1 L 2 + c L 3 2 = u v + c (u + v - 1). U=0, V=1 Setting c = -�/(1 - �), one gets 2 (uc, vc) u 1 C(u, v) = (1 -�)u v - �(u + v - 1) = 0. U +V =1 v 2 T V P 2 P 1 U U=1, V=0 For 0 ��� 1, and 0 �u, v such that u + v � 1, C(u, v) = 0 is inside the triangle P 1 T P 2. Consider a point Pc on C(u, v) = 0, Pc = (uc, vc). 06/03/2021 © Gershon Elber, Technion 33
Conic Arcs as Rational Functions Consider the ratio U=0, V=1 P 2 V T (uc, vc) U +V =1 A 2=(0, v 2) A 1=(u 1, 0) P 1 And the ratio 06/03/2021 U U=1, V=0 © Gershon Elber, Technion 34
Conic Arcs as Rational Functions U=0, V=1 V A 2=(0, v 2) T (uc, vc) U +V =1 And consider the product of these two ratios P 2 A 1=(u 1, 0) P 1 U=1, V=0 U On a point (uc, vc), in curve C(u, v), (1 -�)u v = �(u + v 2 1) or and 06/03/2021 © Gershon Elber, Technion 35
Theorem 3. 13 U=0, V=1 P 2 V If P 1, T, P 2, A 1 and A 2 are T as above, then the product A 1=(u 1, 0) (uc, vc) U +V =1 A 2=(0, v 2) P 1 of the ratios U=1, V=0 U is a constant for the whole conic section. 06/03/2021 © Gershon Elber, Technion 36
Conic Arcs as Rational Functions Because , we have, and similarly 06/03/2021 © Gershon Elber, Technion 37
Conic Arcs as Rational Functions V P 2 Going back to the conic curve, we have T (uc, vc) P 1 06/03/2021 © Gershon Elber, Technion U 38
Conic Arcs as Rational Functions In order to parameterize �as a rational form �(t), t�(a, b), r 1 and r 2 must satisfy the following constraints, 1. r 1 r 2= k, k = 4�/(1 -�) constant. 2. r 1(t), r 2(t) map (a, b) to (0, �) and (� , 0). 3. r 1(t), r 2(t) must be monotone for t�(a, b). Question: Question Why r 1(t), r 2(t) map to (0, �)? Why is there a monotonicity constraint? 06/03/2021 © Gershon Elber, Technion 39
Conic Arcs as Rational Functions One possible solution for r 1(t), r 2(t) is and : or 1 is verified. 2 and 3 are trivial to verify as well. 06/03/2021 © Gershon Elber, Technion 40
Conic Arcs as Rational Functions Then, Hence, every conic section can be written as a rational quadratic parametric function. 06/03/2021 © Gershon Elber, Technion 41
Example 3. 19 (Arc of a circle) Assume a circle of radius r spanning �degs. For ri = 1, 2, T Thus, Pc A 1 Question: Question What will be the effect, if any, of w 1 �, w 2 �w 2 /�? 06/03/2021 © Gershon Elber, Technion P 1 A 2 P 2 c 42
Homogeneous Coordinates The rational form of quadratics equals, 2 2 Let � 1(t) = (b - t) , � 2(t) = 2(t - a)(b - t), � 3(t) = (t - a). Then, 06/03/2021 © Gershon Elber, Technion 43
- Slides: 43