480 likes | 671 Views
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:.
E N D
Computer Aided Geometric Design Class Exercise #1 Curve Representation MFC and CAGD kit 1
Q.1 The following plane curves are given in parametric form. Find an implicit form representing the same curves. 1. . 2. . 3
Solution: The first curve is the standard parameterization of an ellipse – which we know satisfies an implicit equation of the form: 4
Solution: To find the constants we look at: and similarly: 5
Solution: then: is (a possible) implicit equation. 6
Solution: The second curve: . is less familiar… 7
Solution: Easy solution: Somehow, observe that taking both squares gives: 8
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
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
Solution: For example – let’s find : 11
Solution: Now, by the identity: we have: 12
Solution: Solving the equation for gives: or, equivalently: 13
Solution: A similar calculation gives: 14
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
Solution: You will see a more detailed treatment of rational curves later in lectures. 16
Question: We found implicit equations for the curves, typically of the form: Are these representations unique? Are there better/worse representations? 17
Answer: Clearly not unique. For example, the equations: and are satisfied by exactly the same sets of points! 18
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
Question: OK, are there really distinct representations? 20
Answer: Yes. Geometrically, we are asking if there are two distinct surfaces: having the same zero set. 21
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
Q.2 The following plane curves are given in implicit form. Find a parameterization representing the same curves. 1. 2. 23
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
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
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
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
Here it is (for Something bad happens here. You will see this in detail later in lectures. 28
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
Solution: We calculate: We got the following implicit equation: Is it now easier to parameterize? 30
Solution: is equivalent to: This is an ellipse, with and with the origin translated to . 31
Solution: This is a curve we know how to parameterize: a possible parameter domain which gives all points is . 32
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
Solution: First we parameterize. Let’s leave as the parameter. Recall: Now substitute and get: 34
Solution: Using trigonometric identities, this can be written as: 35
Solution: Finding an implicit form – we use the polar implicit form: and remember that: 36
Solution: Therefore: Again, we prefer a polynomial, so: 37
Solution: which is a polynomial implicit form. 38
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
Here itis: Clearly, we cannot have a global explicit form! 40
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
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
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
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
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