Track Layout Geometry

Here are some more advanced ideas for LEGO train layouts, while still keeping consistent with the restrictions of track geometry. While none of these ideas are original to myself (with the possible exception of the yard at the bottom), I hope this explanation will inform and inspire you to build better and hassle-free LEGO layouts.

New as of Jan 7 2008: this page is now available in Italian courtesy of ITLUG, the Italian LEGO® Users Group. You can see the Italian translation on the ITLUG Web site. (EDIT 9/15/2008: updated URL)

Note: This page was originally written several years before LEGO switched from powered 9V track to all-plastic track with battery trains. If you are using the all-plastic track you can ignore considerations of short circuits (see the Wye oh Wye? section). Also, the Flex Track piece is not included in this discussion; that makes some track shapes easier to achieve, though trains are more likely to derail on Flex Track than normal track that is assembled according to the principles on this page. The all-plastic Double Crossover track is also not included.

Table of Contents

Introduction

LEGO track geometry is very limiting. There are only a handful of available pieces. From left to right, these are: straight, curve, left switch (or point), right switch, and cross track (There is also the newer Flex Track piece, but it is not covered by this document):

LEGO Track Parts

Each straight track piece is 16 studs long and 8 wide. The curved pieces produce a 22½° bend, so that 4 of them make a 90° turn. The switches have a different kind of curve in them, and they are meant to be used in conjunction with a curved track to produce parallel tracks. Here are some of the basic track concepts that are valid with LEGO track. Each one preserves perfect alignment with the studs on the large grey baseplate (48×48 studs).

Alignment Examples

Straight track can go anywhere. But in order for the alignment of tracks to be maintained consistently through curves and switches, it is necessary to adopt some standards. The standard that works best is:

  • Adjacent parallel tracks have a pitch of multiples of 16 studs; or put another way, 8 studs between tracks.
    This is dictated by the geometry of the LEGO track switch, which creates parallel tracks of this pitch.
  • On a 48×48 baseplate, tracks may run down the center of the baseplate or 4 studs in from either edge. This is for symmetry and in order to preserve the previous rule.
  • On a 32×32 baseplate, tracks may only run 4 studs in from either edge.
  • Horizontal and vertical track segments must begin and end on a baseplate boundary, except for dead-end spurs.

If you follow these rules, you will never have trouble getting your layout to line up.

On first glance you may think this is too limiting, because the following restrictions would seem to be implied by the above rules:

  • All curves must be 90°, consisting of 4 curve pieces.
  • All switches must have a curve piece on the “spur” end to make the track parallel to the “main” line.

However, there are some additional things you can do with LEGO track geometry that do not violate our rules. This is because in the real world, there is a little bit of slack in the connections, and the studs can still be made to line up with certain alternate configurations.

[top]

Crossovers

A crossover is where you have two parallel tracks with a line connecting them. The standard way is to take the switch geometry described above, and create a crossover where the two switches line up with a pair of curved tracks in between. But look at the right hand crossover: it also lines up, only instead of the two curves there is a single straight piece:

Crossover

How does this work? Well, it turns out that 2 curved track pieces, when positioned at 22½° from horizontal, have the same amount of vertical distance between start and end as a single straight at that angle. Also, the horizontal distance is almost exactly double that of a straight.

But what if you put nothing in between? Then the tracks don’t line up right:

Bad Crossover

DON’T DO THIS. The areas circled in red are not lined up properly. If you want these tracks to line up elsewhere on your layout you will run into problems. Just add a straight or two curves (or two curves and several straights, to make a parallel track in between). Remember, a switch is NOT the same as a curve!

[top]

Changing Two Curves To a Straight

It’s not just crossovers that let you replace two curves with a straight. Here are some other situations where this trick can help avoid unnecessary zigzagging of your trains.

S-Curves

A standard "S" curve (left) is made with eight curves. But replace the two middle curves with a straight (right) for a smoother shape that uses less space.

Switch-Turn

A branch line coming off a switch can be given a gentler curve, and take up less real estate, with the same technique.

Loopback

You can loop back on yourself by replacing 2 curves with a straight.

Room for Crossover

A crossover requires extra space between the parallel tracks. Here’s one way, using both types of "S" curves,

to separate them enough for a crossover without interfering with spacing on the rest of the main line.

[top]

Wye oh Wye?

A wye (named for the letter Y) is one of the most common ways for trains to turn around, and it allows you to connect the loops of your layout in different ways for interesting variations.

Caution: a wye made of powered LEGO (or any DC model train) track will have a short circuit! You will need to electrically isolate the track segments in at least one spot in order to make it work. You can do this by inserting paper between the track pieces before connecting them, and then cutting away the excess. Of course, if you are using plastic track that consideration does not apply.

The wye on the left uses standard LEGO geometry, with 4 curved tracks in each 90° turn. In the one on the right, the double curves (3 sets of them) are replaced by straights. This shrinks the size and produces more reasonable curves.

Wye

[top]

22½° Diagonal Track

Another convenient coincidence that comes in handy when designing layouts involves a straight track running at a 22½° angle. If you use 12 straight tracks with a curve at either end, you can still line up your track at both ends while having a more unusual track angle.

22 Degree Diagonal

This works because of the magic of Pythagorean triples. Like the well-known 3-4-5 triangle, you can make a perfect right triangle using dimensions of 5, 12, and 13. In such a case, the angle is 22.62°, which is close enough to 22½ that it works. Thanks to Jason Railton for pointing this out. But why is it 12, and not 13, you ask? Remember above where you can replace 2 curves with a straight? The 13th straight is replaced by the curves at either end of the 12. Note that a horizontal track of 12 units will line up nicely with the end of the diagonal track.

This trick only works if the begin and end of the turn are parallel. If you want to have the begin and end be perpendicular, you need an extra straight. Here’s why:

22 Degree Diagonal with Turn

[top]

45° Diagonal Track

There are no Pythagorean triples that produce anything close enough to a 45° angle, but we can use math to derive a result anyway. Trigonometry tells us that the distance traveled horizontally or vertically for each unit of diagonal movement is the sine of 45° (or cosine if you prefer; they’re equal for a 45° angle), or 0.7071. This is also half of the square root of 2 (1.4142). So we need a number that, when multiplied by 0.7071, produces something close enough to an integer that it will work with LEGO track.

1 x 0.7071 = 0.7071
2 x 0.7071 = 1.4142
3 x 0.7071 = 2.1213
4 x 0.7071 = 2.8284
5 x 0.7071 = 3.5355
6 x 0.7071 = 4.2426
7 x 0.7071 = 4.9497
8 x 0.7071 = 5.6568
9 x 0.7071 = 6.3639
10 x 0.7071 = 7.0710 Good
11 x 0.7071 = 7.7781
12 x 0.7071 = 8.4852
13 x 0.7071 = 9.1923
14 x 0.7071 = 9.8994
15 x 0.7071 = 10.6065
16 x 0.7071 = 11.3136
17 x 0.7071 = 12.0207 Better
18 x 0.7071 = 12.7278
19 x 0.7071 = 13.4349
20 x 0.7071 = 14.1420

The best choice is 17 straights, but you should be able make 10 work also.

45 Degree Diagonal

 

Thanks to Larry Pieniazek, David Koudys, and Jeff Van Winden for their postings in a thread about this topic on LUGNET.

Note: this requires that the beginning and end be perpendicular to line up properly. If you need the beginning and end to be parallel, add a right angle turn (four curves) to the above. You can simplify it by replacing two of the curves with a straight, but you will still need to go the “wrong way” with one curve track in order for it to line up:

45 Degree Diagonal without Turn

[top]

Diagonal Track with Switches

You can add a switch and curve to each end, or replace the two resulting curves with a straight, just like we did in the earlier crossover:

22 Degree Diagonal with Switch

The result is a pair of switches separated by 14 straights. Put several of these together, and you have a switching yard:

Switching Yard

We can also do the same thing with a 45° track:

45 Degree Diagonal with Switch

[top]

The Big Yard

Here is a big switching yard that uses several of the ideas shown here:

Big Yard

You can also find more ideas by Tim Strutt at his Brickshelf folder.

[top]

Track Designer files

If you have the Track Designer program on your PC, here are the files for each of these examples (minus the text and arrows and such):

[top]

Image hosting courtesy of BrickShelf. You can also view this page as a BrickShelf folder.

42 thoughts on “Track Layout Geometry

  1. Pingback: Bill Ward’s Brickpile: Building a brighter tomorrow with LEGO® bricks » Blog Archive » Track Layout Geometry

  2. Pingback: Bill Ward’s Brickpile: Building a brighter tomorrow with LEGO® bricks » Blog Archive » My Track Geometry page translated to Italian

  3. Bill Post author

    Larry has posted a blog entry linking here. Since Blogspot doesn’t do trackbacks I’m posting it as a comment manually. Thanks Lar!

  4. mathijs

    you have to make something like a idea for a big track with two switches, 17 straigts & 31 curves. if you do that than i can build a big city so please design something?????!!!!!

    (p.s. what for program do you youse to design these tracks?)

  5. Bill Post author

    This page shows some of the techniques you would use to design your layout, but what you need depends on how much space you have to work with. I don’t design custom layouts, sorry. The program I used was Track Designer which is a pretty old program; I think there may be newer ones available now but I haven’t tried them.

  6. Jonathan Steele

    Not owning any Lego or Lego track, I wonder about Real World track fit. In particular, since your criteria for choosing number of track segments for “45° diagonal track” is to choose “integer lengths”, what would happen with 7 diagonal straight pieces, which to me, look attractive. Isn’t a shorter substitution more generally useful?
    (from a guy into fudging the fit)

  7. Bill Post author

    If you look at the table where I did the math, with 7 straight pieces on the diagonal you’d have a hard time lining it up with the rest of the track. There’s a lot of slop in the track connections though, so you can get away with a lot of things that I don’t recommend here because of the play in between track connections. However, that can cause derailing if it’s extreme enough, so to play it safe use the tips on this page.

    LEGO has recently introduced some flexible track pieces which are 1/4 the length of a straight piece and have a hinge in the middle, so there’s a lot more you can do, but the new track doesn’t have conducting rails so it can only be used with battery-powered trains.

  8. Simon

    This is pretty cool. I have some little train track bought by grandpa in the sixties. Somehow, I have been struggling to reconstruct it. Thanks for the info. I am sure this will be very helpful.

  9. Bill Post author

    Actually if it’s from the 60s it’s probably 4.5v or 12v track, and the geometry is different for those…

  10. David

    Hi,

    I have been messing around with the atlas track designer and I have been having a devil of a time trying to get it to do the layout I want. I feel that it is possible I’m just not doing whatever it is I need to do to get it working.

    What I am trying to do I have (crudely) sketched down below. Its basically the smallest reversing figure 8 I can make so I can fit it into the internals of my 4×8 layout. I would like to put a switch or 2 on that reversing section and draw a branch line off around the outside of the 8 but that will be easy once I get the 8 figured out.

    If you could please let me know the pieces I need to put in to make it happen I would be grateful. Please email it to me at [email address deleted] it would make my day.

    …….____________……
    …../……..\…../………\
    …/…………\./…………\
    ..|…………..|…………..|
    …\…………/.\…………/
    …..\____/…..\____/

    note: I dont have to have the center overlap, a simple crossing of any standard degree would be fine.

    this would also be acceptable (and preferible if posible) the “oval-eight”

    …….____________……
    …../……..\…../………\
    …/…………\./…………\
    ..|…………..|…………..|
    …\…………/.\…………/
    …..\____/___\____/

  11. Bill Post author

    LEGO has only one type of crossover, which has tracks meet at 90 degrees. That dictates that the minimum size of the layout would need to be 5’8 by 2’9.

    If you let the tracks cross by having a bridge where one goes over the other, you could do it smaller.

  12. David

    OH YES!

    Very very nice, thats exactly what I was looking for. I am trying to get as much switching and track pieces as I can get into this 4×8 layout (realism is not in effect here) mostly to play with and I would like to use standard pieces without having to resort to flex track. I have never been very good at using that stuff.

    Thanks so much!

  13. David

    In TD 2.0 what does the Z height have to be in order for a normal sized HO train to fit underneath for a crossover?

    Thinking of how long a branch line has to be in order to cross back over the figure 8 mainline

  14. Bill Post author

    The height features of Track Designer have never worked well for me. I think there are some bugs there. I just lay one track atop the other and worry about height only when doing it for real. But then, I’ve never tried to cross tracks that way in a layout. Hills don’t work well – the trains slow when climbing and zoom when going downhill – so our club doesn’t use them.

    Probably you should be using BlueBrick instead of TD anyway … TD is totally unsupported, and the author doesn’t even have the source code. I keep meaning to make that transition myself, but I have spent too much time in TD. But if you’re just starting out, use BlueBrick. http://bluebrick.lswproject.com/

  15. Bill Post author

    Nope. I’ve seen plastic track made by some Chinese knockoff brand but not with the electric rails.

  16. Mark

    After reading Craig Bisgeier’s “The Ten Commandments of Model Railroad Yard Design” (http://www.housatonicrr.com/yard_des.html ), I returned here to locate the various parts in the Big Yard and was wondering if you have comments on the design considerations that went into the Big Yard.
    Thanks.

  17. Bill Post author

    I’m not familiar with those Commandments… the Big Yard I designed was mostly designed to fit the most complexity into the smallest space within the confines of LEGO track geometry, not so much to match any kind of realistic prototypical yard.

  18. Clive

    hi bill and others
    i have a question about sidings i have tried to run 9V sidings but the circut isn’t complete (dead line) is there a way to have powered sidings? maybe using a pemblock, so i can run a small shunter and shift frieght cars.
    also just to help you with one of the other questions. Me-models.com has now got aftermarket metal track that comes in the same geometry as 9V.
    You can also make your own out of the newer non conductive track by applying adhesive metal striping usually used in Stained glass making. It’s freely available and carries current although i haven’t tried it yet. I have read from others who have successfully used it to increase there layout size. and they praise it for it’s value.

  19. Chester Zmijewski

    Will the Lego trains operate on ordinary O gauge track or do you have to use special Lego trac?
    Thanks Chester

  20. Charlie Johns

    Do you know if the chinese nock -off brand of lego trains work with RC track? I am talking about Enlightment

  21. Mark Z

    In the last layout by Bill before my post, can you please tell me how many of each track piece is required? I am VERY new to trains and will be getting my first one tomorrow.

    Thanks!

  22. Bill Post author

    I’m not sure which layout you’re talking about, but if you look carefully at the image it’s not hard to count the track segments yourself.

  23. GoatMan302

    The Enlighten brand of knock-off track does work with the RC Lego track system. My mother bought me some when my wife told her about my love of Lego trains. They do work nicely, once you get past the difference in colour.

  24. Claudio Gomes

    Beside’s the new Flex Track that you already mentioned there’s also 7996 – Train Rail Crossing.

  25. Bill Post author

    Good point Claudio… I tend not to think about the plastic track, since our club uses 9V for the train layouts.

  26. Radek-Poland

    Thank you for idea!

    I’m begin in LEGO train and search good idea for my big city and train tracks system (20 X 20). And Im can not made, a good town plan tracks in main brain. This web page, and you idea is very, very helpfull and usefull in practics LEGO train. Thank you

  27. Robert

    Do you have any pictures of the track opening where you can go in and out of the middle of the track layout. I wanted to see how you made the connections and also how and if you cut the track pieces by the hinges. Thanks for your help.

  28. Bill Post author

    All the connections are standard LEGO parts connected in standard ways. There’s no cut parts or anything like that. If you’re using 9V track, you may need to electrically isolate portions however.

  29. Gilles

    Well… Is there a similar discussion for Duplo tracks anywhere ? I am having a real hard time doing anything a bit interesting for my kids ! I did not expect it to be so involved !

  30. Ronald

    I’ve tried the crossover you show at the top. It’s close, but not close enough to actually fit on two 48 baseplates like you’re showing. Gonna try on smaller baseplates to spread the gap if you know what I mean…

  31. Bill Post author

    The crossover with one straight track between the two switches works fine, but it makes the “main lines” kind of far apart. But we have done it many times in club layouts.

  32. Ronald

    Exactly; so if you have it all on smaller baseplates it’ll work, but if you put it on 48 baseplates like in your picture it just won’t fit.

  33. Bill Post author

    The pictures are all to scale. Our club standard is to put 4 studs of open baseplate between the edge of the baseplate and the track. Using that standard it fits fine.

  34. Josh

    How do you attach the curves to the plates when they don’t line up on studs? Do you just use 1×1 on points of contact where they do line up?

  35. Bill Post author

    We don’t. Our club (BayLTC) doesn’t attach the tracks at all – we let them float on top of the baseplates, and only anchor the track down in a few areas – for example I have a level crossing MOC, and we have a customized lift gate which has the track permanently attached to the wooden structure. But everywhere else we just have track floating.

    If you do anchor it down, put a layer of plates between the track and the baseplate, and use tiles under the curved track.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>