I’ve been kinda obsessed with getting clothoids to work in a railway track editor. It’s easy enough to build out of clothoids into empty space, but connecting tracks is where it gets really hard.
For now all I have to share is this explainer I made some years ago: https://xixixao.github.io/euler-spiral-explanation/
Wow, that’s a really detailed deep dive, saved it for a read later. I didn’t even realize clothoids are also tricky to connect. I never really dared to jump into actually implementing them myself.
Super dumb question but if you have one railway line on the left splitting into two on the right: if you extended the clothoids of the two back to the left past the junction, would their wave patterns intersect each other again? What happens if you take the further left cross intersections and then split to the right from there along bezier curves to two points matching the x+ of the original intersection and an arbitrary y-/y+ where the further-back (left) waves intersected? Purely spitballing but is there a way you could use the previous two points where the ripples crossed before the point of the junction, and interpolate splines from there?
Bad/quick visual: https://pasteboard.co/5QgDdTVVSm1I.png