Title: Interactive Graphics Using Parametric Equations Day 2 Dr' Niels Lobo Computer Science
1Interactive Graphics Using Parametric Equations
(Day 2)Dr. Niels LoboComputer Science
2Bezier Curves
- Google bezier curves
- http//www.doc.ic.ac.uk/dfg/AndysSplineTutorial/B
eziers.html/
3 Question 1 and choices
- Pierre Bezier was a
- A. automechanic
- mathematician in car design industry
- hairdresser
- race car driver
4Interactive Graphics Curves
- Uses
- -- Design of Fonts and other printer symbols
- -- Consumer goods shapes of cell phones, cars,
etc.
5Bezier Curves
-
- Curve is specified by 2 equations
- and are curve
endpoints -
- and are
guidepoints
6A Bezier Curve
7Bezier Curves
- Mathematically, we verified that
- Slope of a handle is same as tangent at endpoint
- i.e., the tangent at has same
slope as the - segment joining to
8 Graphics Curve in General Form
-
- Curve is specified by 2 equations, one is
- Which can be re-written as
9General Form of Bezier Curve
-
- This equation
-
can be re-written as -
10General Form of Bezier Curve
-
- This form
- can be re-written as
11General Form of Bezier Curve
-
- Hence, the equations are (using n3, for 4
points) - Generic notation,
- Or,
12General Form of Bezier Curve
-
- Can be re-written as,
- Or,
- where the organizer can choose n, and the user
- then supplies n1 points.
13 General Form of Bezier Curve
-
- is,
- Most common is n3, some use n2, and n4.
- Abandon notion of handles, and use notion of
- guidepoints.
14 General Form of Bezier Curve
-
- Most common is n3, some use n2, and n4.
15 Question 2 and choices
- In this Figure, value of n for the first and
last is - A. 3 and 3
- 3 and 5
- 2 and 4
- 4 and 4
16Bezier Curve in Matrix Notation
-
- Consider the familiar case
- It expands to
-
17Towards Matrix Notation
18Towards Matrix Notation
19Matrix notation
- Suppose we have 3 Apples 5 Bananas
10 - 6 Apples 7
Bananas 15 - What is cost of Apple? cost of Banana?
- Can write as 3A 5B 10
- 6A 7B 15
- In matrix notation, get
20Matrix notation
- Using matrix notation,
- then would solve this Matrix system
-
- for
- by finding inverse matrix of
- This is studied in class on
- Matrix Algebra or Linear Algebra.
21Matrix Notation
- Matrices are also very useful in Computer
Graphics - for dealing with rotations and 3-dimensional
projections - For now, we only care about the notation i.e.,
that we - can write in one form (English) or the other
(matrix). -
-
- 3 Apples 5 Bananas 10
- 6 Apples 7 Bananas 15
22Question 3 and choices
- Write in Matrix notation 13 Cats 15
Dogs 100 -
9 Cats 6 Dogs 65 - A.
B. - C.
D.
23Question 4 and choices
- 11 Cats 8 Dogs 80
6 Cats 5 Dogs 45 - Which is NOT equivalent to above??
- A.
B. - C.
D.
24Back To Bezier Curves
25Back To Bezier Curves
- This
- has same form for y
- Generic equation
26Recall the Polynomial Notation
27 Bezier Surfaces
28 Bezier Surfaces
- We need
- Figure adapted from Princeton Web site
29 Some Properties of Bezier Surfaces
- Four corners are like Tent anchors, i.e., they
- are tied down to fixed points.
(Interpolation) - Along any border, the surface behaves as a
- single Bezier curve.
- Just as with single curve, the surface fits in
the - Convex Hull of the specified points
30 Some Properties of Bezier Surfaces
- Because the four borders are explicit Bezier
curves, - they can be linked to neighboring patches,
by - making the common border the same Bezier
curve, - i.e., the same four control points.
31 Demo Bezier Surface
- Google Bezier surface demo
- http//
32 Verify that (t0,s0) is tied down
33Question 5 and choices
- Given
what is ? - A. B. C.
D.
34 Verify
35 Question 6 and choices
36 Verify
37 Question 7 and choices
- For
-
what is - 0 0 0 1 B. 0 0 0
-1 - C. 1 0 0 0 D. -1 3
-3 1
38 Question 8 and choices
- So have
- Which is
- A. B. C.
D.
39 Verify
- So have
- So done verification!!
40 Question 9 and choices
- Can join patches because
- They would need to have common 4 points
- They would look good regardless of seam
- They would provide a jump in smoothness
- Not possible to join patches
41Question 10 and Choices