What is Chaikin's algorithm?
Chaikin's algorithm is a method used in computer graphics to create smooth curves from a given set of points or a polyline. The algorithm works by making new points on the line which form a smoother curve.
How does it work
Chaikin's algorithm is quite simple and produces the results based on the number of iterations performed.
Draw a line to represent the polygon (open or closed) to encapsulate the curve.
Generate the new sequence of control points at a ratio of
and of the size of the line segment.
The above equations represent the control points on a line segment as shown below.
Connect the points so that the second point of a segment connects to the first control point of the next segment.
Repeat the process to get a smoother curve.
Matrix form
The matrix representation of Chaikin's algorithm is given below.
The above representation shows the new control points (
) and their respective sizes ( , ).
The left column matrix represents the new points
and obtained when the algorithm is applied to the original control points. The matrix on the right side is a constant coefficient matrix used in Chaikin's algorithm. It scales and combines adjacent control points to generate new points on a smoother curve.
The matrix is multiplied by
to scale down the effect of Chaikin's algorithm. It ensures that the new points
and , generated by applying the algorithm to the original control points, are scaled down by a factor of . It helps to control the level of smoothness in the resulting curve.
Note: The smaller the scaling factor, the smoother the curve will be, and vice versa.
Demonstration
Continue reading
Free Resources