By popular demand... here's the code, written in Processing that actually draws the train sets . I hadn't released it because I didn't think it was very interesting, but you are welcome to it. // -------------------------------------------------------------------------- // // Small program to draw pictures of Ikea Lillabo track layouts using // instructions derived from my Perl program. // // Written by John Graham-Cumming ( http://www.jgc.org/ ) // // Released under the General Public License, version 2 // // -------------------------------------------------------------------------- // This is the cursor position (x, y) coordinates and angle to the // horizontal float x, y, a ; // The length in pixels of a single straight piece float len = 40 ; // See the Perl program for a full explanation, but there are 8 curves // in a circle and from that the radians of curve arc, the length of the // straight line between the curve ends and the curve angle to t