Train Knots

June 2, 2022

This is an entry for @sableRaph's weekly creative coding challenge. The theme for this week was trains, as Dan Shiffman of The Coding Train was a guest for the livestream.

This generates tracks using a Spirograph-like system. The tracks themselves are saved to p5.Geometry objects for efficiency. Tangents and normals along the path to be able to generate the rails, sleepers, and to orient the train as it moves along the track.

This uses a blur shader from my newly-released p5.Framebuffer library.