1 / 46

Computer Aided Geometric Design

Computer Aided Geometric Design. Class Exercise #1 Curve Representation MFC and CAGD kit. 1. Curve Representation. 2. Q.1. The following plane curves are given in parametric form. Find an implicit form representing the same curves. 1. . 2. 3. Solution:.

meda
Télécharger la présentation

Computer Aided Geometric Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Aided Geometric Design Class Exercise #1 Curve Representation MFC and CAGD kit 1

  2. Curve Representation 2

  3. Q.1 The following plane curves are given in parametric form. Find an implicit form representing the same curves. 1. . 2. . 3

  4. Solution: The first curve is the standard parameterization of an ellipse – which we know satisfies an implicit equation of the form: 4

  5. Solution: To find the constants we look at: and similarly: 5

  6. Solution: then: is (a possible) implicit equation. 6

  7. Solution: The second curve: . is less familiar… 7

  8. Solution: Easy solution: Somehow, observe that taking both squares gives: 8

  9. Solution: This means: We found (a possible) implicit equation: The curve is in fact the unit circle! The longer solution: How is the trigonometricparameterization of a circle obtained from the rational one? 9

  10. Solution: Recall the following change of parameter: Is a useful tool to convert trigonometric expressions to rational expressions (and vice versa). Remark: Be careful with parameter domain! 10

  11. Solution: For example – let’s find : 11

  12. Solution: Now, by the identity: we have: 12

  13. Solution: Solving the equation for gives: or, equivalently: 13

  14. Solution: A similar calculation gives: 14

  15. Solution: Finally, we can see that the curve in the question: . can be reparameterized, using Which is the unit circle (or part of it). 15

  16. Solution: You will see a more detailed treatment of rational curves later in lectures. 16

  17. Question: We found implicit equations for the curves, typically of the form: Are these representations unique? Are there better/worse representations? 17

  18. Answer: Clearly not unique. For example, the equations: and are satisfied by exactly the same sets of points! 18

  19. Answer: Better/Worse? Depends on the application. For example, the following (poor) representation of a circle: has a gradient which vanishes on the entire curve. This is a problem in many applications. 19

  20. Question: OK, are there really distinct representations? 20

  21. Answer: Yes. Geometrically, we are asking if there are two distinct surfaces: having the same zero set. 21

  22. Answer: Here is an example for the unit circle. As the zero set of a paraboloid: or as the zero set of a cone: 22

  23. Q.2 The following plane curves are given in implicit form. Find a parameterization representing the same curves. 1. 2. 23

  24. Solution: The natural parameterization is always choosing This means We can do this in all cases we can convert from implicit to explicit form. This is not always possible! 24

  25. Solution: For the first curve: choosing gives: OK, but let’s try to find something “nicer”. For instance – can we find a polynomial parameterization? 25

  26. Solution: Yes. From the implicit equation: we see that choosing gives: Fortunately, this is satisfied by . So we found another parameterization: which, in many senses, is better! 26

  27. Solution: What would be a suitable parameter domain, giving the entire curve? This is easily seen from the explicit form: Since may be any real number, and or , must take all as well. 27

  28. Here it is (for Something bad happens here. You will see this in detail later in lectures. 28

  29. Solution: The second curve: is a quadratic bivariate polynomial. Soon you will see in lectures a systematic way to determine which quadratic curve this is, and what are all options. For now, let’s just try to complete the square and see what we get. 29

  30. Solution: We calculate: We got the following implicit equation: Is it now easier to parameterize? 30

  31. Solution: is equivalent to: This is an ellipse, with and with the origin translated to . 31

  32. Solution: This is a curve we know how to parameterize: a possible parameter domain which gives all points is . 32

  33. Q.3 The following plane curve is given in polar coordinates, implicit form: Find implicit and parametric representations in Cartesian coordinates. Can you find an explicit form? 33

  34. Solution: First we parameterize. Let’s leave as the parameter. Recall: Now substitute and get: 34

  35. Solution: Using trigonometric identities, this can be written as: 35

  36. Solution: Finding an implicit form – we use the polar implicit form: and remember that: 36

  37. Solution: Therefore: Again, we prefer a polynomial, so: 37

  38. Solution: which is a polynomial implicit form. 38

  39. Solution: Explicit form? Trying to find from: doesn’t work, and certainly not for all . It can sometimes be done locally, and sometimes not at all. (How can we see that from the implicit form?) 39

  40. Here itis: Clearly, we cannot have a global explicit form! 40

  41. MFC and The CAGD Kit 41

  42. General Information The course lab assignments: Implement an interactive modeling environment for the geometric objects of the corresponding chapter in the course. MFC Designing the interface, Windows, Dialogue Boxes, Menus, etc. CAGD Graphic and Geometric functionality – displaying points, curves, etc. 42

  43. General Information The skeleton provides you with the framework for the graphic environment (instead of openGL, for example). Your main task is the geometric/mathematical work! 43

  44. MFC MFCKit2004.sln – The solution skeleton you should use. Resource Files– Designing the UI, for example: Menu (under “IDR_MAINFRAME”) Dialogue boxes (under “IDD_RHODIALOG”) And more… 44

  45. MFC CMFCKit2004View - Implementing UI functionality. Some functions for example: OnLButtonDown OnMouseMove OnTimer – This is useful for animation, for example. OnConicsSetproduct – functionality behind a menu item called “Set Product”, etc… (MFC tutorial – Computer Graphics course) 45

  46. CAGD cagd.h – creating, deleting, showing and hiding geometric objects. CCagdPoint –basic class: a 3D point Some important functions: cagdSetColor cagdShowSegment cagdHideSegment cagdAddPoint And more… 46

More Related