Chaikin Curves
Sometimes I want to draw Voronoi or similar polygons in a rounded form:
I use a process called Chaikin's Algorithm for this.
Start with a polygon:
Mark the midpoints of each side:
Then construct quadratic Bezier curves. Each original vertex becomes the control point of the quadratic Bezier, and the two adjacent midpoints become the two end points of the Bezier:
Super simple to implement! If you don't have a quadratic Bezier drawing function, you can use the De Casteljau Algorithm to subdivide the original line into smaller lines. Repeat this until you get line segments that are fairly close to the quadratic Bezier.
I used this for this project and this project.
0 Comments:
Post a Comment
<< Home