So like, a Very Long Time Ago I made these cool swirly curves while working on aerobat vfx stuff
Conceptually it's really simple:
Imagine a car driving at a constant speed. As it drives, the steering wheel is turned left/right according to some function. In this case it's just a cosine wave, i.e. you just smoothly wobble the wheel back and forth. By simply changing how fast the steering wheel oscillates, and how far from the center it's allowed to turn, the path of the car plots these different curves.
This is really easy to plot over time in a game, or in a single for-loop. It's a basic Turtle Graphics situation [turtles are operated by steering wheels]
OKAY BUT
I just happened to be thinking about a similar problem the other day: wouldn't it be nice to track an object's position precisely along a curve representing the ground, instead of losing precision to floating-point error or having to approximate the curve as line segments? What kinds of curve would we have to restrict ourselves to in order to be able to compute the Cartesian position given only the length of the object's travel along the curve?
If we have a turtle moving at a fixed velocity, and only its angle changes over time, then that means the curve of its travel must correspond to a complex integral z(t) = ∫ exp[i f(t)] dt, for some real function f(t) that indicates the angle of travel at time t. There aren't that many forms of exp[g(t)] that have closed-form integrals (unless you count the elliptic integral functions as closed form), pretty much only g(t) = k t, so that limits the possibilities for f(t) such that f(t) must either be in the form k t, or in some form that simplifies the exp away. That leaves the following options:
old post, relevant to our interests, resharing so we don't lose it before we get a chance to read it. enjoy!
