Upcoming SlideShare
×

# Basic Curve Surface

2,474 views

Published on

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### Basic Curve Surface

1. 1. Basic theory of curve and surface
2. 2. Geometric representation <ul><li>Parametric </li></ul><ul><li>Non-parametric </li></ul><ul><ul><li>Explicit </li></ul></ul><ul><ul><li>Implicit </li></ul></ul><ul><ul><li>y = f(x) </li></ul></ul><ul><ul><li>f(x, y) = 0 </li></ul></ul>x = x(u), y = y(u)
3. 3. Geometric representation <ul><li>Example - circle </li></ul><ul><li>Parametric </li></ul><ul><li>Non-parametric </li></ul><ul><ul><li>Explicit </li></ul></ul><ul><ul><li>Implicit </li></ul></ul><ul><ul><li>y =  R 2 – x 2 </li></ul></ul><ul><ul><li>x 2 + y 2 – R 2 = 0 </li></ul></ul>x = R cos  , y = R sin 
4. 4. <ul><li>Each form has its own advantages and disadvantages, depending on the application for which the equation is used. </li></ul>Geometric representation
5. 5. Non-parametric (explicit) <ul><li>Only one y value for each x value </li></ul><ul><li>Cannot represent closed or multiple-valued curves such as circle </li></ul><ul><ul><li>y = f(x) </li></ul></ul>
6. 6. Non-parametric (implicit) <ul><li>Advantages – can produce several type of curve – set the coefficients </li></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Not sure which variable to choose as the independent variable </li></ul></ul>f(x,y) = 0 ax 2 + bxy + cy 2 + dx + ey + f = 0
7. 7. Non-parametric (cont) <ul><li>Disadvantages </li></ul><ul><ul><li>Non-parametric elements are axis dependant, so the choice of coordinate system affects the ease of using the element and calculating their properties. </li></ul></ul><ul><ul><li>Problem  if the curve has a vertical slope (infinity). </li></ul></ul><ul><ul><li>They represent unbounded geometry e.g </li></ul></ul><ul><ul><li>ax + by + c = 0 </li></ul></ul><ul><ul><li>define an infinite line </li></ul></ul>
8. 8. parametric <ul><li>Express relationship for the x, y and z coordinates not in term of each other but of one or more independent variable (parameter). </li></ul><ul><li>Advantages </li></ul><ul><ul><li>Offer more degrees of freedom for controlling the shape </li></ul></ul><ul><ul><ul><li>(non-parametric) y= ax 3 + bx 2 + cx + d </li></ul></ul></ul><ul><ul><ul><li>(parametric) x = au 3 + bu 2 + cu + d </li></ul></ul></ul><ul><ul><ul><li>y = eu 3 + fu 2 + gu + h </li></ul></ul></ul>
9. 9. Parametric (cont) <ul><li>Advantages (cont) </li></ul><ul><ul><li>Transformations can be performed directly on parametric equations. </li></ul></ul><ul><ul><li>Parametric forms readily handle infinite slopes without breaking down computationally </li></ul></ul><ul><ul><li>dy/dx = (dy/du)/ (dx/du) </li></ul></ul><ul><ul><li>Completely separate the roles of the dependent and independent variable. </li></ul></ul>
10. 10. Parametric (cont) <ul><li>Advantages (cont) </li></ul><ul><ul><li>easy to express in the form of vectors and matrices </li></ul></ul><ul><ul><li>Inherently bounded. </li></ul></ul>
11. 11. Parametric curve <ul><li>Use parameter to relate coordinate x and y (2D). </li></ul><ul><li>Analogy </li></ul><ul><ul><li>Parameter t (time) – [ x(t), y(t) as the position of the particle at time t ] </li></ul></ul>x y t1 t2 t3 t4 t5 t6
12. 12. Parametric curve <ul><li>Fundamental geometric objects – lines, rays and line segment </li></ul>All share the same parametric representation a b line a b ray a b Line segment
13. 13. Parametric line <ul><li>a = (a x , a y ), b = (b x , b y ) </li></ul><ul><li>x(t ) = a x + (b x - a x )t </li></ul><ul><li>y(t) = a y + (b y - a y )t </li></ul><ul><li>Parameter t is varied from 0 to 1 to define all point along the line </li></ul><ul><li>When t = 0, the point is at “a”, as t increases toward 1, the point moves in a straight line to b. </li></ul><ul><li>For line segment : 0  t  1 </li></ul><ul><li>For line : -   t   </li></ul><ul><li>For ray : 0  t   </li></ul>a b
14. 14. Parametric line <ul><li>Example </li></ul><ul><ul><li>A line from point (2, 3) to point (-1, 5) can be represented in parametric form as </li></ul></ul>x(t) = 2 + (-1 – 2)t = 2 – 3t y(t) = 3 + (5 – 2)t = 3 + 3t
15. 15. Parametric line <ul><li>Positions along the line are based upon the parameter value </li></ul><ul><ul><li>E.g midpoint of a line occurs at t = 0.5 </li></ul></ul><ul><li>Exercise : </li></ul><ul><li>Find the parametric form for the segment with endpoints (2, 4, 1) and (7, 5, 5). Find the midpoint of the segment by using t = 0.5 </li></ul>
16. 16. Parametric line <ul><li>Answer: </li></ul><ul><li>Parametric form: </li></ul><ul><li>x(t) = 2 + (7 –2)t = 2 + 5t </li></ul><ul><li>y(t) = 4 + (5 – 4)t = 4 + t </li></ul><ul><li>z(t) = 1 + (5 – 1)t = 1 + 4t </li></ul>
17. 17. <ul><li>Answer </li></ul><ul><li>Midpoint </li></ul><ul><li>x(0.5) = 2 + 5(0.5) = 5.5  6 </li></ul><ul><li>Y(0.5) = 4 + (0.5) = 4.5  5 </li></ul><ul><li>Z(0.5) = 1 + 4(0.5) = 3  3 </li></ul>Parametric line
18. 18. <ul><li>Another basic example </li></ul><ul><li>Conic section - the curves / portions of the curves, obtained by cutting a cone with a plane. </li></ul><ul><li>The section curve may be a circle, ellipse, parabola or hyperbola. </li></ul>Parametric curve (conic section) ellipse hyperbola parabola
19. 19. Parametric curve (circle) <ul><li>The simplest non-linear curve - circle </li></ul><ul><li>- circle with radius R centered at the origin </li></ul><ul><li>x(t) = R cos(2  t) </li></ul><ul><li>y(t) = R sin(2  t) </li></ul><ul><li>0  t  1 </li></ul>
20. 20. <ul><li>If t = 0.125  a 1/8 circle </li></ul>Parametric curve (circle) <ul><ul><li>t = 0.25  a 1/4 circle </li></ul></ul><ul><ul><li>t = 0.5  a ½ circle </li></ul></ul>t = 1  a circle Circular arc
21. 21. <ul><li>Circle with center at (x c , y c ) </li></ul><ul><li>x(t) = R cos(2  t) + x c , </li></ul><ul><li>y(t) = R sin(2  t) + y c , </li></ul>Parametric curve (circle)
22. 22. Parametric curve <ul><li>Ellipse </li></ul><ul><ul><li>x(t) = a cos(2  t) </li></ul></ul><ul><ul><li>y(t) = b sin(2  t) </li></ul></ul><ul><li>Hyperbola </li></ul><ul><ul><li>x(t) = a sec(t) </li></ul></ul><ul><ul><li>y(t) = b tan(t) </li></ul></ul><ul><li>parabola </li></ul><ul><ul><li>x(t) = at 2 </li></ul></ul><ul><ul><li>y(t) = 2at </li></ul></ul>a b a b
23. 23. Control for this curve <ul><li>Shape (based upon parametric equation) </li></ul><ul><li>Location (based upon center point) </li></ul><ul><li>Size </li></ul><ul><ul><li>Arc (based upon parameter range) </li></ul></ul><ul><ul><li>Radius (a coefficient to unit value) </li></ul></ul>
24. 24. Parametric curve <ul><li>Generally </li></ul><ul><ul><li>A parametric curve in 3D space has the following form </li></ul></ul><ul><ul><ul><li>F: [0, 1]  ( x(t), y(t), z(t) ) </li></ul></ul></ul><ul><ul><li>where x (), y () and z () are three real-valued functions. Thus, F ( t ) maps a real value t in the closed interval [0,1] to a point in space </li></ul></ul><ul><ul><li>for simplicity, we restrict the domain to [0,1]. Thus, for each t in [0,1], there corresponds to a point (x( t ), y( t ), z ( t ) ) in space. </li></ul></ul>If z( ) is removed -  ? A curve in a coordinate plane
25. 25. Tangent vector and tangent line <ul><li>Tangent vector </li></ul><ul><ul><li>Vector tangent to the slope of curve at a given point </li></ul></ul><ul><li>Tangent line </li></ul><ul><ul><li>The line that contains the tangent vector </li></ul></ul>
26. 26. <ul><li>F(t) = ( x(t), y(t), z(t) ) </li></ul><ul><li>Tangent vector : </li></ul><ul><ul><li>F’(t) = ( x’(t), y’(t), z’(t) ) </li></ul></ul><ul><ul><li>Where x’(t)= dx/dt, y’(t)= dy/dt, z’(t)= dz/dt </li></ul></ul><ul><li>Magnitude /length </li></ul><ul><ul><li>If vector V = (a, b, c)  |V| =  a 2 + b 2 + c 2 </li></ul></ul><ul><li>Unit vector </li></ul><ul><ul><li>Uv = V / |V| </li></ul></ul>Compute tangent vector
27. 27. Compute tangent line <ul><li>Tangent line at t is either </li></ul><ul><ul><li>F(t) + u F’(t) </li></ul></ul><ul><ul><li>or </li></ul></ul><ul><ul><li>F(t) + u (F’(t)/|F’(t)|)  if prefer unit vector </li></ul></ul><ul><ul><li>u is a parameter for line </li></ul></ul>
28. 28. example <ul><li>Question: </li></ul><ul><li>- given a Circle, F(t) = (Rcos(2  t), R sin(2  t)) , 0  t  1 </li></ul><ul><li>Find tangent vector at t and tangent line at F(t). </li></ul>
29. 29. example <ul><li>Answer </li></ul><ul><li>dx = Rcos(2  t), dy = R sin(2  t) </li></ul><ul><li>x’(t) = dx/dt = - 2  Rsin (2  t), </li></ul><ul><li>y’(t) = dy/dt = 2  Rcos(2  t) </li></ul><ul><li>Tangent vector = (- 2  Rsin (2  t), 2  Rcos(2  t)) </li></ul>
30. 30. example <ul><li>Answer </li></ul><ul><li>Tangent line </li></ul><ul><ul><li>F(t) + u (F’(t)) </li></ul></ul><ul><ul><li>(Rcos(2  t), R sin(2  t)) + u (- 2  Rsin (2  t), 2  Rcos(2  t)) </li></ul></ul><ul><ul><li>(Rcos(2  t) + u (- 2  Rsin(2  t))) , (R sin(2  t) + u (2  Rcos(2  t))) </li></ul></ul>
31. 31. Example <ul><li>Check / prove </li></ul><ul><li>Let say, t = 0, </li></ul><ul><li>Tangent vector = (- 2  Rsin (2  t), 2  Rcos(2  t)) </li></ul><ul><li>= (0, 2  R) </li></ul><ul><li>tangent line = (Rcos(2  t) + u (- 2  Rsin(2  t))) , (R sin(2  t) + </li></ul><ul><li>u (2  Rcos(2  t))) </li></ul><ul><li> = (R, u (2  R)) </li></ul>R
32. 32. Tangent vector <ul><li>Slope of the curve at any point can be obtained from tangent vector. </li></ul><ul><li>Tangent vector at t = (x’(t), y’(t)) </li></ul><ul><li>Slope at t = dy/dx = y’(t)/x’(t) </li></ul>
33. 33. <ul><li>The curvature at a point measures the rate of curving (bending) as the point moves along the curve with unit speed </li></ul><ul><li>When orientation is changed the curvature changes its sign, the curvature vector remains the same </li></ul><ul><li>Straight line  curvature = ? </li></ul>curvature
34. 34. curvature <ul><li>Circle is tangent to the curve at P </li></ul><ul><li>lies toward the concave or inner side of the curve at P </li></ul><ul><li>Curvature = 1/r , r  radius </li></ul>P P
35. 35. curvature <ul><li>The curvature at u , k ( u ), can be computed as follows: </li></ul><ul><li>k ( u ) = | f'( u ) × f''( u ) | / | f'( u ) | 3 </li></ul><ul><li>How about curvature of a circle ? </li></ul>
36. 36. Curve use in design <ul><li>Engineering design requires ability to express complex curve shapes (beyond conic) and interactive. </li></ul><ul><ul><li>Bounding curves for turbine blades, ship hulls, etc </li></ul></ul><ul><ul><li>Curve of intersection between surfaces. </li></ul></ul>
37. 37. <ul><li>A design is “GOOD” if it meets its design specifications : These may be either : </li></ul><ul><ul><li>Functional - does it works. </li></ul></ul><ul><ul><li>Technical - is it efficient, does it meet certain benchmark or standard. </li></ul></ul><ul><ul><li>Aesthetic - does it look right, this is both subjective and opinion is likely to change in time or combination of both. </li></ul></ul>Curve use in design
38. 38. Representing complex curves <ul><li>Typically represented </li></ul><ul><ul><li>A series of simpler curve ( each defined by a single equation ) pieced together at their endpoints.( piecewise construction ) </li></ul></ul>
39. 39. Representing complex curves <ul><li>Typically represented </li></ul><ul><ul><li>Simple curve may be linear or polynomial </li></ul></ul><ul><ul><li>Equation for simpler curves based on control points ( data points used to define the curve ). </li></ul></ul>
40. 40. An interactive curve design a) Desired curve b) User places points c) The algorithm generates many points along a “nearby” curve
41. 41. <ul><li>Interactive design consists of the following steps </li></ul><ul><ul><li>Lay down the initial control points </li></ul></ul><ul><ul><li>Use the algorithm to generate the curve </li></ul></ul><ul><ul><li>If the curve satisfactory, stop. </li></ul></ul><ul><ul><li>Adjust some control points </li></ul></ul><ul><ul><li>Go to step 2. </li></ul></ul>An interactive curve design