Chapter 58 Bezier Curves 2
Plan
1 - Recap on some key points from last chapter (keep up to date with philomath’s blog)
Processing uses cubic bezier - 2 Anchor points (AP) and 2 control points (CP)
(Make the point that ‘cubic bezier’ => MAXIMUM number of turning points is 2)
Joining two bezier curves together - HOW to KEEP Joined curve ‘smooth’ by making common anchor point (AP) and last control point (CP) of 1st curve and 1st control point of 2nd curve on a straight line - introduce the term ‘colinear’ - Refer back to chapter 24 equation of a straight line.
Demo program 1
Devise a simple program which allows you to plot 7 points - and uses cubic beziers to draw a curve - allow this curve to remove sharp turns at common anchor point by moving either the common anchor point or the last control point of the 1st curve or first control point of the second curve so all 3 points are colinear - by hitting the ‘S’ (S for Smooth) key.
Explain how we can move one of the CPs or common AP using the equation of a straight line y = mx + c
Demo Program 2
Compare a pair of joined cubic beziers with a complex poly - trace both
MORE HERE
Demo Program 3
Using Bezier Curves for animation - describe a Processing program which plots an animating flower or flowers - using CBC - Describe the maths (O Level) to work out where the Anchor Points and control points are to draw one petal of a flower -
A DIAGRAM IS VERY IMPORTANT HERE -
SHOWING A CIRCLE WITH A SEGMENT - TWO RADIUS LINES AT AN ANGLE WITH THEIR TANGENT LINES GOING OUT IN OPPOSITE DIRECTIONS AND ANOTHER TWO LINES RADIATING FROM THE TANGENT POINTS AT A GIVEN ‘TILT’ ANGLE.
Explain the maths in terms of straight lines - but also give an alternative mathematical method using CROSS product (to work out tangent) and matrices to rotate the tangents to a given tilt angle.
Wednesday, 31 December 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment