## The Math Behind LEGO Building Techniques – Volume 2

Every so often we come across a technique used in an official LEGO set or a MOC that leaves us scratching our heads. Surely there must be a good explanation for how that technique works, but it isn’t always readily apparent. As it turns out, there is usually some math involved and my goal with this series of posts is to try to delve into the math behind LEGO techniques. The first post in this series can be found here.

In April 2022 LEGO announced two new additions to their Botanical Collection line. I will be talking about one of them (10311 Orchid) in this post. What kind of math could possibly be involved in a set with flowers anyway ? The answer of course lies in the vase. At first glance it almost seems miraculous how the fluted vase is put together with its perfectly round shape and double slopes attached on the outside with nary a gap to be found between them.

The vase was the first thing that caught my eye when I saw the announcement for the Orchid set (although I have to admit that the rest of it is pretty neat too). It is not always easy to create round shapes using LEGO (I have covered a few different ways here). The designer of the Orchid set (Mike Psiaki who is also responsible for the Titanic and Apollo Saturn V sets among others) has come up with a very clever way that relies on the mathematical properties of the 8×8 round plate which we will now examine.

The 8×8 round plate is a relatively new addition to the LEGO catalog joining its smaller siblings (such as the 4×4 and 6×6 round plates). But one thing that is neat about the 8×8 round plate is that all the studs on its periphery are located at about the same distance from the edge of the plate and this includes the studs along the diagonals. This is not true for the 6×6 round plate where the studs along the diagonals are inset a little bit from the edge of the plate.

To understand why, let us consider the diagonal distance between two studs which is √2 times a stud dimension (0.8 cm) which equals 1.13 cm. On the 6×6 round plate, the distance between the outermost studs along the diagonals is 3 x 1.13 = 3.39 cm = 4.24 studs whereas on a 8×8 round plate it is 5 x 1.13 = 5.65 cm = 7.06 studs which is very close to the 7 stud separation between the outermost studs along the horizontal and vertical axes.

What this allows us to do, is place technic bricks along the outer edge of the 8×8 round plate with technic pins sticking out by about the same amount on all sides. Of course, the 1×1 technic bricks along the diagonals need to be rotated by 45 degree angles. The 8×8 round plate with 8 technic pins sticking out is just one of 4 layers that are stacked and rotated using turntables to make up the core of the vase.

The angle of rotation of the even layers (layers 2, 4) is half of 45 degrees or 22.5 degrees. This places the 8 technic pin locations on the even layers exactly halfway between the 8 technic pin locations on the odd layers. When all 4 layers are stacked we have a total of 16 columns of technic pins spaced evenly along the circumference of the core.

16 technic 1×7 liftarm pieces can be attached to these technic pins allowing us to then attach the double slope pieces needed to create the fluted appearance. Notice that with the 4×4 macaroni tiles added on the top, the height of each layer is 5 plates and this ensures the correct vertical spacing between the technic pins when the layers are stacked (5 plates as we know from the basic SNOT equation is equivalent to 2 studs).

Why do we even need the liftarm pieces ? Why not use SNOT bricks instead of the technic bricks and attach the double slope pieces to them directly ? We again need some math to help explain this. The diameter of the 8×8 round plate is 8 studs or 20 plates. With the liftarm pieces (which are 1 stud thick) attached on both sides, the total diameter becomes 20+2.5+2.5=25 plates.

The circumference of the core is now π x 25 = 78.5 plates. Now divide that by 16 and you get 4.9 plates which is very close to the 5 plate (2 stud) width of each double slope piece. Now we see how the liftarm pieces help make the inner core just large enough to attach the double slope pieces all around with almost no gaps showing between them.

Speaking of turntables, they have also been used in multiple official sets to build angled walls. An example is the Spring Lantern Festival set (80107) where 4×4 turntables are used to attach an arched footbridge at an angle over a koi pond.

A LEGO turntable consists of a base (2×2 or 4×4) which can be attached like a normal plate and a top that can swivel freely by a full 360 degrees. The 2×2 base requires a matching top element while the 4×4 base can accommodate a variety of compatible elements including a 4×4 round plate.

Even when we are using turntables to create an angled wall (or a structure attached at an angle, as in this example), we are essentially creating a right angled triangle that satisfies the Pythagorean Theorem (which I have covered in more detail here). The sides of this triangle intersect at the axes of rotation on the turntables (the center points of top plates). The Pythagorean Triple used in this case is (6,8,10).

As we have seen here, we don’t have a lot of options to choose from if we just limit ourselves to Pythagorean Triples. Most applications of the Pythagorean Theorem use the smallest and most common triple (3,4,5) as in the Boutique Hotel set covered here or a multiple like (6,8,10) used in the Spring Lantern Festival set.

However in certain situations, it is possible to fudge the math a bit and get away with a triple (set of 3 numbers) that is not a Pythagorean triple strictly speaking, but is close enough for practical purposes. I like to call these “near triples”.

When we create angled walls using “near triples”, it is always a good idea to use elements like hinges that naturally have a little bit of wiggle room. This minimizes the strain that you are putting on the LEGO elements when you make the connections for the angled section.

I have used “near triples” like (5,5,7) and (7,7,10) often in my builds and some of these have the added advantage of allowing us to create walls at 45 degree angles (which is not possible with Pythagorean Triples). I wasn’t aware of any official sets that used “near triples” until I looked through the instructions for the Corner Garage 10264 modular set that LEGO released in early 2019.

One notable aspect of this modular is that a large part of the front façade of the garage is built at a 45 degree angle. There is also an awning above a gas station island that is attached perpendicular to that façade (and ends up being at a 45 degree angle relative to the base).

If we dig into the instructions for this set, we see that the angled section is built on a 2×16 plate that is attached at a 45 degree angle using 1×2 rounded plates. The total length of the angled section is 17 studs measured between the studs at the two connection points.

If we think of this as the hypotenuse of a right triangle, the other two sides would each be 12 studs long (if you picture horizontal and vertical lines drawn along the LEGO grid from the studs at the two connection points, they would intersect at a stud that is 12 studs away in each direction).

Now, (12,12,17) is not a Pythagorean triple strictly speaking. But the length of the hypotenuse in a right triangle where the other two sides are 12 is √(122 + 122) = 16.97 which is close enough to 17. The 1×2 rounded plates act like hinges and provide a firm connection while allowing a little bit of wiggle room.

“Near triples” also come into play in the way the awning is attached at a 45 degree angle (relative to the baseplate). But it is a little less obvious how the math works here. Taking a closer look, we see that the awning is 16×10 studs wide with rounded corners. It is attached to the angled wall of the garage using a hinge assembly consisting of a 1×3 tile with 1 finger on top (attached to the angled wall) and a 1×2 brick with 2 fingers (which is incorporated into the awning itself).

The awning is supported by two vertical posts that are created using technic axles and axle connectors. These posts connect the awning to the gas station island but the island itself is connected to the base in just one spot. There is a good reason for that.

The gas station island has two 4×4 round plates that are 6 studs apart (center to center) but there is no way to connect both these at a 45 degree angle given that there are no “near triples” with 6 as the biggest number. So the designers chose to connect one side of the gas station island to a 2×2 tile with a hole (this attaches to the bottom of the 4×4 round plate to form a turntable) and leave the other side unconnected (it simply rests on the 2×2 black turntable base).

We can look at the side that actually has a connection and try to figure out the math that is involved. The connection point is exactly 13.5 studs from the line connecting the ends of the angled façade. This can be broken up into two “near triples”. First, we start with the right triangle representing the original “near triple” (12,12,17).

If we draw a line from the vertex (corner) opposite the longest side (or hypotenuse) so it intersects the hypotenuse at a right angle, we would get two identical right triangles with dimensions (8.5,8.5,12). This is also a “near triple” and so we can think of 8.5 out of 13.5 to be one of the legs (shorter sides) of this smaller right triangle. The remaining 5 is the hypotenuse (longest side) of another “near triple” (3.5,3.5,5). Pretty cool, right ?

One of the best things about LEGO is that there are literally an infinite number of ways in which you can put pieces together to create a model. There’s usually some trial and error involved in designing a model and you may stumble upon certain techniques that work surprisingly well, even if you are not cognizant of the underlying math.

It is quite fascinating (at least for me) to try to understand why something works the way it does. I am hoping that this series of posts ends up piquing your interest as well. If there is any particular technique in an official set or MOC that you would like me to cover in a future installment of this series, please be sure to let me know in the comments section.

Happy Building !

## Thinking Outside the Grid – Building Angled Walls using LEGO

Introduction

How many different ways can you attach a 1×6 brick to a baseplate ? There are quite a few as you can imagine, but each time the studs of the brick have to line up with the studs of the baseplate under it. That is just how LEGO works. The studs on the baseplate are in a regular square grid and therefore you can only place your 1×6 brick such that it is parallel to one of the sides of the baseplate. Suppose you are building a castle out of LEGO and one of your walls needs to be at a 45 degree angle, are you out of luck ?

Remember the regular square grid I mentioned earlier ? If you take any stud on the baseplate, it is exactly the same distance away from each of its neighbors on all 4 sides and that distance happens to be 0.8 cm (or a “stud” which is also the basic unit of measurement in LEGO). But the studs in the 4 corners are farther away (the distance is √2 x 0.8 cm = 1.414 x 0.8 cm = 1.13 cm to be exact). That is because in a square, the 4 sides are of equal length but the distance between any two opposite corners is a little longer. Similarly, the distance between any two studs measured at any angle other than 0 or 90 degrees is not guaranteed to be a whole number of studs.

So how can we turn our 1×6 brick to a different angle and still have it attach firmly to the baseplate ?

Angled wall basics

Let’s try a little experiment now – place two 1×1 plates as shown in the picture below. Now, if you place the 1×6 brick diagonally bridging these two 1×1 plates, it works ! The studs at the two ends of the 1×6 brick line up with the studs on the two 1×1 plates. This allows the 1×6 brick to have a good connection to the baseplate (at least at the two ends). The remaining 4 studs on the 1×6 brick still don’t line up with the studs below (now you see why we had to use the 1×1 plates as spacers to raise the 1×6 brick). So what exactly is going on here ?

If you jog your memory back to high school math (if you haven’t gotten there yet, you will just have to take my word for it), the equation a2 + b2 = c2 may seem vaguely familiar. That is the Pythagorean Theorem that defines the relationship between the sides of a right angled triangle.

Let’s take a closer look at where the two 1×1 plates were placed on the baseplate. If we count along the two sides of the baseplate starting from the corner, we see that the 1×1 plates are 3 and 4 studs away from the corner stud and make up two sides of a right angled triangle. Our 1×6 brick is placed along the third (and longest) side, also known as the hypotenuse. The triangle we created satisfies the Pythagorean theorem because 32 + 42 = 9 + 16 = 25 which is equal to 52. Then, does it make sense that we used a 1×6 brick for the longest side ? Yes, because the three sides of the right angled triangle intersect at the studs and the distance that really matters is the distance between the studs at the two ends of the 1×6 brick which is 5 studs.

So the bottom line is that for any brick or plate to be placed at an angle other than 0 or 90 degrees, you need to make sure the resulting triangle satisfies the Pythagorean theorem. Any set of 3 numbers that satisfies this theorem is called a Pythagorean triple and (3, 4, 5) is the smallest such set made up of whole numbers. What are some other Pythagorean Triples ? Listed below are all the Pythagorean Triples with numbers less than or equal to 25. As you can see, there are not many with practical applications in LEGO builds.

Angled walls using hinge elements

If we were to use the method described earlier to build angled walls, there is just no good way to avoid gaps at the corners where the angled wall segments meet the regular wall segments placed along the LEGO grid. An alternative is to use hinge elements.

There are many different types of LEGO hinge elements but the ones we need for angled walls are the ones that swivel – specifically the 1×4 hinge plate that consists of a 1×2 swivel base and a 1×2 swivel top.

The 1×2 plates that make up each of the two halves of the hinge plate are joined at their corners by a hinge that allows the angle between the plates to be changed from 0 to 180 degrees. If you place two 1×4 hinge plates as shown below, you can bridge them with a 1×5 plate (yes, LEGO makes one now !) attached at the top.

We are still creating the same right angled triangle (3, 4, 5) as before, but this time the hypotenuse (angled side) has 5 studs instead of 6. This is because the sides of the right angled triangle now intersect at the corners of the plates rather than the studs.

An example of a LEGO official set that uses the (3,4,5) triple extensively is the Boutique Hotel set (10297). Here you can find not one but 6 separate (3,4,5) triangles used to create the angled walls that give the building its unique triangular shape. More details can be found here.

Angled walls using turntables

A LEGO turntable consists of a base (2×2 or 4×4) which can be attached like a normal plate and a top that can swivel freely by a full 360 degrees. The 2×2 base requires a matching top element while the 4×4 base can accommodate a variety of compatible elements including a 4×4 round plate.

Turntables give us another way to create angled walls and this technique has been used in multiple official LEGO sets. An example is the Spring Lantern Festival set (80107) where 4×4 turntables are used to attach an arched footbridge at an angle over a koi pond.

Even when we are using turntables to create an angled wall (or a structure attached at an angle, as in this example), we are essentially creating a right angled triangle that satisfies the Pythagorean Theorem. The sides of this triangle intersect at the axes of rotation on the turntables (the center points of top plates). The Pythagorean Triple used in this case is (6,8,10).

Near Triples (When close enough is good enough)

The angled wall we built earlier can probably pass for a 45 degree wall but if you take a closer look at it, the smaller angle is more like 37 degrees. A right-angled triangle with a 45 degree angle is called a special right triangle because the third angle also ends up being 45 degrees (the three angles in a triangle have to add up to 180 degrees). This also means that the two sides that make up the right angle have to be of equal length. None of the Pythagorean triples we have seen, has two smaller numbers that are equal. So is it really possible to achieve a 45 degree wall using LEGO ?

Thankfully, the little bit of give that hinge plates have, allows us to use numbers that are close enough to Pythagorean triples. Consider for instance (5,5,7) and (7,7,10) which are “near triples” that allow you to build LEGO walls at 45 degree angles as shown below.

(12, 12, 17) and (17, 17, 24) are a couple of others. There are also “near triples” like (4, 7, 8) and (4, 8, 9) that don’t give you a 45 degree angle but are useful nonetheless.

Official sets have also used “near triples” such as the Corner Garage set (10264) that uses (12,12,17) to create the part of the main façade that sits at a 45 degree angle. You can find more details here.

Using jumper plates for even more options

Pythagorean triples (or “near triples”) also work when you multiply all the numbers in a triple by a whole number like 2 or halve them. For instance, take the triple (3, 4, 5) and multiply all the numbers by 2 and you get another triple (6, 8, 10). Similarly, if you take the “near triple” (7, 7, 10) and halve all the numbers, there is reason to believe that (3.5, 3.5, 5) would work. But how do you create a triangle that has sides that are 3.5 studs long ? Using jumper plates, of course !

Combining “near triples” with half stud increments gives you more options for building 45 degree walls. One combination I have found to be particularly useful is (8.5, 8.5, 12) which is half of a “near triple” (17, 17, 24).

Angled Walls – Hearst Tower

The Hearst Tower in New York is a wonderful example of a skyscraper that combines old and new architectural styles. It preserves the façade of the original 6-story Art Deco building as its base and adds a modern glass tower on the top. Two of the corners of the base are chamfered and I needed to build 45 degree walls for those two corners. Based on the scale I was using, I needed the angled wall section to be about 7 studs wide. This was a perfect application for the “near triple” (5,5,7).

Angled Walls – Taj Mahal

One of the modern wonders of the world, the Taj Mahal in Agra, India is probably one of the most well known masterpieces of Islamic Architecture. The main structure in the Taj Mahal is a mausoleum that sits on a raised platform. The mausoleum is shaped as a cube with four truncated corners that create the shape of an unequal octagon. To create the chamfered corners in my LEGO model, I used another “near triple” (7, 7, 10).

Angled Walls – Tribune Tower

One of the most beautiful skyscrapers in the world – the Tribune Tower in Chicago was inspired by Neo-Gothic architecture. Its highly ornate crown complete with flying buttresses was designed after the Butter Tower of the Rouen Cathedral in France. My LEGO model of this building required not one but several different types of angled walls. For the chamfered corners of the main tower I used the “near triple” (5,5,7). The two levels of the octagonal crown used two near triples – (8.5, 8.5,12) and (7,7,10) and the flying buttresses were attached to the base of the crown using another near triple (4,7,8).

Angled walls – other techniques

This article would not be complete without at least a mention of a few other ways of building angled walls using LEGO. The techniques we have seen so far create angled walls by placing elements along the hypotenuse (angled side) of a right-angled triangle. But for this to work, the length of the hypotenuse has to be a whole number of studs and this limits our options to Pythagorean triples and near triples.

There are a few other techniques where we don’t actually place any elements along the hypotenuse and can therefore disregard its length. This opens up quite a few other possibilities …

The “mirrored hypotenuse” technique

Let us start with an arbitrary right triangle – say the sides that make up the right angle are 6 studs and 2 studs long. The length of the hypotenuse (angled side) would be √(62 + 22) = 6.32 studs which is not a whole number. It is not possible to place a LEGO element along this side, but if we mirror the right triangle along the hypotenuse, we can create an angled wall by placing LEGO elements along the other two sides of the second triangle. We will need to use hinge plates to join the two mirrored right triangles together.

A more common application of the mirrored hypotenuse technique uses wedge plates to create the two mirrored triangles. The 6×3 wedge plates create triangles that are equivalent to the ones from my earlier example (where the numbers I picked were not so arbitrary, after all). This technique is used to create angled sides in the floor and roof sections of the Boutique Hotel set (10297). You can find more details here.

It is also possible to extend this technique to unequal triangles where the hypotenuse of one triangle is one of the sides that makes up the right angle of the second triangle. The resulting quadrilateral (4-sided shape) would have to satisfy the equation for a Pythagorean quadruple which is a2 + b2 + c2 = d2. The simplest Pythagorean quadruple is (1,2,2,3). Multiply all numbers by 2 and you get (2,4,4,6) which is a Pythagorean quadruple as well.

The neat thing about Pythagorean quadruples is that they can be used to place elements at an angle not just in 2 dimensions but in 3 dimensions as well. Credit goes to hafhead on Flickr for the idea.

The “switched diagonals” technique

The diagonal distance between two studs on a plate may not be a whole number of studs. But if you take a rectangular plate, the distances between the two pairs of studs at opposite corners (1, 3 and 2, 4) are exactly the same. So you can rotate the plate and attach it such that its corners 2 and 4 line up with where the corners 1 and 3 normally would be. Once again you will need to use 1×1 plates as spacers.

If you think of 1-3 and 2-4 as the longest sides of two identical right angled triangles that are mirrored, all you are doing is rotating one of the triangles so that the longest sides are lined up. The angle of rotation would obviously depend on the size of the right angled triangle (the number of studs on the two sides that make up the right angle). It turns out that the closest you can get to a 45 degree rotation is by using a 4×8 plate.

This technique can also be extended to include hinge elements. It looks a little different because this time the diagonals that are switched go all the way to the corners of the plates.

Conclusion

I am sure there are several other ways to create angled walls that I have not been able to cover here. I am hoping the overview I have provided at least points you in the right direction for your own exploration of these techniques. Please let me know if there are other techniques you have used that merit an inclusion here. Happy building !

(Note: This is an expanded version of an earlier post – this time all the pictures have also been redone).