Turtle Graphics - Curved Paths
[Index] [<< Previous section: Basic Motion] [Next section: Turtle and Window Control >>]
quadcurve cpx cpy epx epy
qc cpx cpy epx epy
- Description: moves the turtle on a path described by a quadratic Bézier curve.
The parameters are the coordinates of: the control point (cpx cpy) and the end point (epx epy):
- Example:
qc -100 100 220 220
The result is shown below:
(see more info about the Bézier curve on wikipedia.org here) - Example:
cubiccurve cp1x cp1y cp2x cp2y epx epy
cc cp1x cp1y cp2x cp2y epx epy
- Description: moves the turtle on a path described by a cubic Bézier curve.
The parameters are the coordinates of: the two control points (cp1x cp1y cp2x cp2y) and the end point (epx epy):
- Example:
cc 50 200 90 -180 200 -100
The result is shown below:
(see more info about the Bézier curve on wikipedia.org here) - Example:
[Index] [<< Previous section: Basic Motion] [Next section: Turtle and Window Control >>]