Intuitive methods to draw curves : Polygonal Curves |
Sungbae Kim (All equations are made using m i m e T e X) |
Introduction |
When designers try to draw cuves, they want to draw and control them as they want.
In this lecture, I show how programmers can implement tools to generate curves by intuitive methods,
which are uniform cubic b-spline, 4-point curve and Jarek's curve. In addition, I provide demo programs to enhance your understading. Uniform Cubic B-spline applet 4-point curve applet Jarek's curve applet |
Uniform Cubic B-spline |
Polyloop |
A Polyloop is defined by a cyclic sequence of vertices and represents like below : |
Refinement View applet |
Refinement is to insert a new vertex in each edge to a existing polyloop. |
Smoothing view applet |
Smoothing is to move the old vertices halfway towards the average of their neighbors.
Fig. 3 By smoothing, vertices move towards the average of their neighbors.
Smoothing algorithm is like this:
For each i
vector End For For each i End For By repeating smoothing, a polyloop collapses. Fig. 4 Repeating smoothing. View applet
|
Uniform Cubic B-spline View applet |
By repeating refinement and smoothing, we can get a uniform cubic B-spline from a polygon.
Fig. 5 Repeating refinement & smoothing. View applet
Uniform Cubic B-spline is continous and non-interpolating, and converses quickly. |
4-point curve |
Bulging |
Bulging is to move the new vertices by one-quarter away from the average of their new second-degree neighbors. Fig. 6 How to bulge
|
4-point Curve View applet |
By repeating refinement and bulging instead of smoothing,, we can get a 4-point curve from a polyloop. Fig. 7 Repeating refinement & bulging. View applet
4-point Curve is continuous and interpolating. |
Jarek's curve |
Jarek's tweak |
Jarek's tweak is to move the old vertices by half of the smoothing and the new vertices by half of the bulging. Fig. 8 How to Jarek's tweak
|
Jarek's curve View applet |
By repeating refinement and Jarek's tweak, we can get a Jarek's curve. Fig. 9 Repeating refinement & Jarek's tweak.
View applet
Jarek's curve is a close approximatin to the original polygon than either of these two. |
Reference |
Jarek Rossignac, Education-Driven Research in CAD, CAD, vol. 37, 2004 Jarek Rossignac, Polyloop Curves for Computer Graphics lecture note |