A Boy and His Train

image/svg+xml

The animation works on most browsers except unfortunately Internet Explorer

These are the two simplest solutions to a puzzle of how to simulate a railway crossing where the only pieces provided besides curves and straights are points (junctions) without switches. The train will always go straight through one of the points rather than curving off.

In the two layouts the train always goes across the from one green circle to the opposite one. The bits of track outside are to ensure the train goes each way across both possibilities.

The purple circles?, they're mainly just decoration but they act as crossing points, just the train will only approach from one direction on each path through so they're not general crossings.