12 comments

[ 50.5 ms ] story [ 1064 ms ] thread
The conceptual simplicity of that algorithm is beautiful.
I like the point distance being 0.2. You get more straight lines in them ... great for railroads.

The tracks still follow the general trajectory you want (the terrain?), and pass through the cities (the 0.5 points!), but you get more straight track runs.

Straight tracks can be safely traversed at higher speed. :)

Also nice for garden paths where a balance between alternating curves and straights is more interesting.

Fun tutorial! I also have a bezier library I wrote but had not heard of the Chaikin version.

Tangentially relevant, but I've been going through a book about compass and straight edge (and sector) constructions in furniture design[0], and there's a section on various curves that can be made with a compass, which essentially involves finding points that can be equidistant between two other points, then using that as the center of a circle, I've been wondering if Bezier curves could fit into such a style. From what I can tell, the methods described in the book ensure that the input points are always on the curve, while with b-splines only the first and last point are.

[0]: By Hound & Eye, Lost Art Press: https://lostartpress.com/products/by-hound-eye

Freya Holmer made a very nice visualization of bezier curves by showing the "helper" lines here: https://www.youtube.com/watch?v=aVwxzDHniEw

Worth a watch for a quick introduction/recap on how these curves work in the first place (with a focus on gamedev applications).

The pacing in this article is really nice. Each example is just enough new to not overwhelm, and the deficiency within them is pretty obvious that allows a clean lead into the next talking point to address it. I found this article enjoyable to read.