Yes: this is isomorphic to SE(2) (the special Euclidean group of dimension 2; that is, the group of direct isometries of 2-dimensional space).
[Or, more evocatively, the group of “(orientation-preserving) rigid motions” in 2-dimensional space. And if we were designing roller coasters in n-dimensional space, we’d be using SE(n) instead. While if we had a track piece which acted like a mirror (e.g., in 2 dimensions, imagine a piece which rolled a train 180 degrees so as to turn the wheels to face the air rather than the ground), we’d be using the full Euclidean group E(n).]
A 90-degree with constant radius (another limitation) effectively leaves you in the same grid. I suppoe you could construct a rail set with 45 degrees and sqrt(2) multiple pieces as well.
I’d have to sit down and thing about 30-degree curves. That has an interesting effect, the potnuse of a 60-degree is twice the short side.
Ooh! SE(3). That adds a new twist. ![]()
[/math joke]
Taking this one step further. If we are in 3 space, drop the discrete elements and replace them with differentials and use a system of forces for the other side of the equation we would have the mathematics for the snarling of fishing line wouldn’t we??
Something for me to think about in a couple of years when I take my boy fishing. (He is still unbelievably cute.)
The section with the treadmill makes any further tracklaying irrelevant.
Now, if anyone asks me if roller coasters or trains make me sick, I can answer, “only the algebra.”
As far as what a quarternion is, it’s used to figure rotational motion/orientation in complex space. It has the benefit of avoiding gimbal lock (among other things) in engineering and the like.
And Gimbal lock is a problem of orienting an object using only 3 axes of rotation (Euler angles: x, y, z — or roll, pitch and yaw). If one axis rolls 90° aligning into one of the other two, you lose a degree of rotation, and can then effectively only rotate around two axes.
Quarternions uses real over imaginary numbers in complex space (giving you 4 spacial quadrants), rather than Euler angles, deriving elegant, compact notation and stable rotations all around. Pun intended.
Something about it vaguely smells like degrees vs. radians.
I think I know the answer to this:
You see because Thomas is chuffing and puffing to be a really useful engine and bring the quaternions to Tidmouth Station as fast as he can, he doesn’t see that the rail loop doesn’t connect and runs off the tracks.
Eventually James sees him and helps him back on but because his inattention and mishap, is late delivering the quarternions and Sir Topham Hatt is very cross, until Thomas promises to do better so that he can be a really useful engine.
Meanwhile, Sir Topham doesn’t realize that he has all of these problems because he invests millions of pounds in talking trains but nothing in rail safety and signalling equipment.
Since nobody answered this, I will. Actually, it’s answered in the OP. At the end of the first leg (let’s say it’s a straight track 1 unit long), you’re still facing the same direction as you started. No matter what track section you put next, it starts out in the same direction.
This is different than simply using vectors, where you can go out one unit and come directly back one unit. The fact that you start off in the same direction as the last “vector” imposes a constraint.
If you do what you recommend, it’s still true that in the end, the vector sum is zero. The problem is, this doesn’t help you solve the original problem, because there are any number of ways you can add vectors to sum to zero, but only a small number of those ways correspond to ways that track segments can be put together. Added vectors turn on a dime, trains don’t.
Plus, you can’t associate a single vector with each piece of track, since the individual pieces of track can (and generally must) be rotated to match other tracks.
Awesome. ![]()
An update is warranted.
I measured the pieces and entered their parameters into a spreadsheet in the form (r,d) where:
r is a unit complex number that describes the rotation of the train as it traverses the track piece
d is a complex number that describes the end position of the track piece relative to both its start position and orientation
for example, one curved section describes a left turn on an eighth of a circle with a radius of 108mm. This is represented as:
(1/√2 + i/√2 , 76.4+31.6i)
I set up the spreadsheet so that I could represent the various pieces with a single letter and therefore describe a whole track with a sequence like, “aafefcbaddddaf”
Using the track product as defined by Indistinguishable, that is:
(r[sub]1[/sub],d[sub]1[/sub])•(r[sub]2[/sub],d[sub]2[/sub]) = (r[sub]1[/sub]r[sub]2[/sub] , d[sub]1[/sub]+r[sub]1[/sub]d[sub]2[/sub])
I was able to calculate the effect of a whole track sequence.
When my five year-old daughter assembled a lovely figure eight track for my son to play with – using the bridge pieces and looping right back to the starting point, I took a photo. I then entered the relevant sequence into the spreadsheet and it calculated out to within a few cm of the identity.
It should be noted that with this particular train set the pieces are wooden and fit together like a jig-saw. The join is pretty sloppy and allows for about 5° rotation in the join either way. This seems at first glance to be shoddy design, but in reality is a heuristic feature allowing greater scope of track design. So, the fact that the mathematics did not calculate a perfect loop is not critical.
Nice to know that it works.
So, my daughter builds the track, my son plays with the train and I build the spreadsheets and do the algebra.
Added bonus(?) This is the first time that I have used Excel’s complex numbers capabilities. Great to know that it can be done and good to have the experience but it is a clutzy and unwieldy system to type in.
Thanks for the update, that’s pretty cool.
Toy trains have just been algebra’d, bitches!
Nice work there, j_sum1. Would you care to share the spreadsheet?
emailed.
I played this trick with my son’s Lionel trains, which included parts from my childhood figure-8 set plus a friend’s discards (a friend who was a real Lionel nut, so his discards were gems, including intersections and Y’s). I was surprised how tricky it was to plan tracks that actually worked.
The math was beyond me, though maybe I could figure out what you posted above. I looked for a software solution, but didn’t find a good one that was cheap enough. Anyway, my son and I had lots of fun with the trial and error method. ![]()
Now if only someone with an interested kid can come visit for a few days so I can have an excuse to pull that stuff out of the attic …
Thanks a ton! I love to reverse-engineer such work out of curiosity alone, plus I actually work in CG, so I never know when I might have to formulate a close-track road or rail, and this might actually be practical.
Though I’m not saying I do, and only with your permission, of course…
Go for it cmyk. There is nothing particularly clever or elegant in the spreadsheet. The elegance is in the algebra IMO. And I think that idea is up for grabs.
Thank you, kindly. 
Another update.
j_sum1-ette (5 years) was assembling a track this morning and playing with changing the orientation and order of the curved pieces.
“Daddy. How do make it go into a loop?”
Gotta love it.