-1
\$\begingroup\$

I have a small project with a train that follows a track, composed of discrete pieces. For each piece I calculate the location based on distance traveled, and each carriage gets a fixed offset.

I would like to improve on this with proper bogies, but the distance between the two bogies of a carriage is not the length along the track, it is always fixed distance. How do I best confine my bogies to a track, while kepping the distance between them fixed, regardless of the track curvature?

\$\endgroup\$
6
  • \$\begingroup\$ How did you define the curves of your track mathematically? Are they meshes? Bézier curves? Elliptic curves? \$\endgroup\$ Commented Mar 19, 2020 at 10:13
  • \$\begingroup\$ They are currently parametric functions of each track piece, but generating meshes would be also an option. \$\endgroup\$ Commented Mar 19, 2020 at 11:04
  • 1
    \$\begingroup\$ There are many different kinds of parametric functions. When you would tell us which one you use, then perhaps there is already a textbook solution to your problem. \$\endgroup\$ Commented Mar 19, 2020 at 11:37
  • \$\begingroup\$ I have circle sections and straight sections currently. \$\endgroup\$ Commented Mar 19, 2020 at 12:05
  • \$\begingroup\$ Ah, so your curves are actually circle segments? \$\endgroup\$ Commented Mar 19, 2020 at 12:44

1 Answer 1

0
\$\begingroup\$

there are 2 options:

  1. cheat, just make the distance along the track constant and use the fact that the difference is minimal to hide it. Then you can use the straight line between the bogies to position each carriage on the center between them and aligned to them.

  2. start doing geometry. For a constant curve with radius r the angle theta between bogies with a constant straight line distance d between them when viewed from the center of the curve is theta = 2 * asin(d/2 / r) the length along the track is then r*theta (with theta in radians). You can prove that when r gets larger (a more gentle curve) this gets closer and closer to d.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.