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 !

Squaring the Circle – Building Round Shapes using LEGO

Introduction

LEGO is not a medium that is inherently suited to building round shapes. After all, the basic building block – a 1×1 brick has a square footprint and a LEGO baseplate has studs placed in a regular square grid. And yet, there are many wonderful LEGO creations out there that include round shapes – all kinds of cylinders and even spheres. I did not have much experience building these shapes out of LEGO until I started working on my own version of the Taj Mahal. The focal point of this well-known landmark (which happens to be one of the modern wonders of the world) is its massive dome which sits atop a cylindrical base called the drum (that is an actual architectural term !). The minarets (slender towers) that sit at the 4 corners of the plinth of the Taj Mahal are essentially stacked cylinders too.

Needless to say, I had to take a deep dive into all the techniques out there that can be used to create round shapes using LEGO – I basically scoured the web looking for any information I could find on this topic. Every step of the way, I was amazed and inspired by the endless creativity of the AFOL community (I also tapped into some of the tools created by the Minecraft community). While I can’t claim to have invented any of the techniques listed in this article, I am happy to catalog them here for future reference (giving credit to the inventors wherever possible).

So what exactly is involved in creating round shapes out of LEGO ? The title of this post refers to “squaring the circle” which is an age-old mathematical problem that people tried to solve for centuries until it was proven (in 1882) to be impossible to solve. However it is possible to get close enough by using an approximation of the number π (pi). In much the same way, all the techniques described here try to use square/rectangular bricks or plates to create the best approximation that is possible of the round shape. The result is never perfect and the limitations of the LEGO medium are always apparent in the jaggedness of the curves and the gaps that you may see, especially when you are looking at your model up close. But the trick is creating a pretty convincing illusion of a round shape at least when you look at your model from a few steps back.

Using SNOT to create small cylinders

For the minarets of the Taj Mahal, I did not want to be limited by the small selection of cylinder pieces that LEGO has. I wanted to try a different way of building cylinders that could be scaled to whatever height I needed. I was already familiar with using curved slopes and SNOT to create round shapes (I had used this technique to build the crown in my model of the Chrysler Building). The same technique can be used to create cylinders with various diameters. All the cylinders in the picture below can be built in height increments of two studs.

The smallest cylinder was just right for the minarets of the Taj Mahal, based on the scale I was using. Ideally the minarets should taper as they rise – the way they do in the real Taj Mahal. Unfortunately there was no easy way to reduce the diameter of the smallest cylinder any further.

Bending LEGO walls to create round shapes

A “brute force” way of building round walls using LEGO is by building straight walls and then bending them to form a circle. The longer your wall, the more flex it will have, making it easier for you to bend it into a complete circle. The number of 1×2 bricks needed in each layer to build a stable round wall tends to be around 72, give or take a few bricks. But I have seen round walls built using far fewer plates in each layer.

Check out the work of Jeff Sanders who specializes in “brick bending”. He has an impressive portfolio of creations, made by bending LEGO brick walls not just into circles but various other shapes as well.

Please note that most brick bending techniques are illegal, strictly speaking, because you are using LEGO elements in ways they are not intended to be used and subjecting them to undue stress and possible damage. An obvious downside to this technique (other than it being illegal) is the fact that it cannot be replicated digitally in stud.io.

A few years ago, I embarked on a LEGO project unlike any other that I had worked on before. I wanted to try doing a studs-up mosaic in a round shape. I came up with my own pattern of intertwined snakes and used a little over 14000 plates to build this round thing that I like to think of as some kind of a vase (because a trash can isn’t as appealing). This sits in a corner somewhere in my basement because I still haven’t figured out a good way to finish this and create something worth displaying. Any suggestions would be welcome, of course !

Mixing regular bricks with round 1×1 bricks to create round walls

This uses the same approach as above – except for the fact that we use 1×1 round bricks (or plates) in our wall to allow it to be bent more readily (and legally !). If we alternate say 1×3 bricks in our wall (1×2 bricks also work) with 1×1 round bricks, the round bricks act like hinges to some extent, allowing the wall to be bent to form a circle. This method allows round walls to be built with smaller diameters than is possible with the previous method. The only downside is that the texture of the wall is uneven due to the 1×1 round bricks. It is possible to use tiles to hide the round bricks and create the effect of a real brick wall (credit goes to Steve DeCraemer on Flickr). The 1×3 bricks here are replaced with 3 headlight bricks with their top studs facing out. These headlight bricks are joined together with a 1×3 plates while 1×4 tiles are attached to the face of the round wall creating the look of a brick wall (which should work great for castle builds).

Round walls using hinge bricks/plates

We have seen that hinge pieces can be very useful for creating angled walls and various polygons (hexagons, octagons, etc). The greater the number of sides in a regular polygon (one where all sides have the same length), the closer it starts to approximate a circle. We can take advantage of this fact to use hinge pieces to create round walls.

One tutorial I came across on this topic is this one by Eggy Pop (flickr user name) – https://www.brickbuilt.org/?p=9015

I have re-created the round wall shown in this tutorial in stud.io using 14 1×4 hinge plates to complete the circle (which is essentially a polygon with 28 two-stud wide sides). One of the neat things about this particular round wall is that its diameter (18 studs on the inside, 20 studs on the outside) is a whole number in terms of studs. As you can see, the hinge plates on 4 sides line up with the LEGO grid allowing the round wall to be attached firmly to a base. So what is special about the number 18 ? Let us see if we can use some math to figure that out. Assuming the inside of the wall is close enough to a circle, its circumference would be the diameter times π (pi) = 18 x 3.14 = 56.52 studs. Now divide that by 4 (the length of a 1×4 hinge plate) and you get 14.13 which is close enough (for practical purposes) to a whole number 14 – which happens to be the number of hinge plates we used.

Don’t count on the same working for round walls with inner diameters of say 17 or 19 studs. What are some other numbers that work ? The two numbers closest to 18 that work are 14 and 23 (I used 23 for the drum in my Taj Mahal). As you can see from the pictures, these two numbers don’t work as well as 18 and the hinge plates on only 2 sides line up with the LEGO grid (which is usually good enough). Can we explain why ? In the case of 14, the number of hinge plates needed is (14 x 3.14) / 4 which is approximately 11. Since the number of hinge plates is not an even number, you don’t have the hinge plates lining up with the LEGO grid on all 4 sides. In the case of 23, the diameter itself is not even. And so, if you line up the hinge plates with the grid on one axis, the other axis is offset by half a stud (you could use jumper plates to attach the round wall to the base on the other two sides if needed).

One issue with round walls is that when you have just 2 or 4 connection points to the base, the rest of the hinge plates are free to move and so the round shape can easily get distorted. There is no elegant solution I could think of, to get the wall to maintain its shape (I guess you could use long plates as cross members joining each side of the polygon to the one on the opposite side and then have these cross members attached in the middle using turntables). For now, I just built a regular inner wall as close as possible to the round wall, and attached cheese slopes, curved slopes, etc. to the inner wall using SNOT to fill the gaps the best I could. Since the drum has an outer diameter of 25 studs and I needed to center it on a 24×24 base, I ended up using jumper plates. I also needed jumper plates to center the dome (which is built with a core that is 16×16 studs) on the top of the drum.

Building Round Walls Digitally

While it is quite straight-forward to build these round walls using real pieces, how do you do it in stud.io ? The hinge tool allows you to select a piece and rotate it around a hinge point. In this case, the piece being selected would be one half of the 1×4 hinge plate. When you click on the piece with the hinge tool enabled, you will first see a blue arrow. You can click and drag this blue arrow to manually rotate the piece. Or you can click on the blue arrow to get a white text box where you can enter the precise angle to rotate the piece by.

With round walls it is important to make sure all the hinge plates are rotated by just the right amount or the two ends of the wall will not line up correctly to allow you to complete the circle. To figure out the right angle to use, just divide 360 by the number of sides of the polygon you are building which in the case of the first circle (18 studs diameter) would be the number of hinge plates times 2 = 14 x 2 = 28. 360 divided by 28 is 12.85 degrees which is the number you need to enter in the text box. I tend to apply this rotation to one hinge plate and then copy and paste the hinge assembly (both halves together) as many times as I need.

Building spheres by stacking regular bricks or plates

To understand how spheres are built using LEGO bricks, I have found it useful to first look at the world of Minecraft. There are some parallels between Minecraft and LEGO in that both use building blocks with square footprints that are placed on a square grid. One important difference is that the blocks in Minecraft are perfect cubes while a basic 1×1 LEGO brick is not (it is taller than it is wide). More on that later. Anyway, there are a number of resources available in the Minecraft community for building spheres and other shapes using Minecraft blocks and I was wondering if I could leverage some of them for building LEGO spheres.

Before we look at a 3-dimensional sphere, let us look at a basic circle in 2 dimensions. Minecraft enthusiasts often use what is known as a circle chart. It shows the placement of blocks (or pixels) in a square grid that best approximates a circle. The chart shows circles with different diameters and as you can see from the chart, the bigger the diameter, the more convincing the illusion of the round shape is.

Minecraft circle chart

In the Minecraft world where the building blocks are perfect cubes, you can also look at one of the circles and think of it as the side view of a sphere. You can think of each row in the chart as one of the layers of blocks in the sphere you are building. So you would essentially start with a layer of blocks placed in a circle having the diameter of the sphere you want to build (that would be the biggest circle you need). You would then stack layers with successively smaller circles (as you go up) until you reach the smallest circle you need. Repeat the same on the bottom (with the circles getting smaller as you go down) and you have a complete sphere. Of course, it could be a lot of work to figure all this out by hand (even with the help of a circle chart). Thankfully, an online tool (Plotz Sphere Generator) can automate this process for you. You just enter the diameter you need and presto, a sphere is generated for you (with 3D and 2D views showing how the sphere is constructed layer by layer).

That sounds simple – right ? Unfortunately, there is a lot more work involved if you want to build this sphere using LEGO bricks. For one, the sphere generator just shows blocks which are equivalent to 1×1 LEGO bricks but you know these bricks just can’t be stacked the way you see in the 3D view. You need to convert the 1x1s into longer bricks that form an interlocked structure that holds together well. You also need to make the walls of the sphere at least 2 studs deep, allowing each successive layer (which is a smaller circle as you move away from the middle layer) to rest on the layer immediately below it. There is one last hitch – if you replace all the blocks in the Minecraft sphere with 1×1 LEGO bricks you will not end up with a perfect sphere. Your sphere will be a little taller than it is wide – just like a 1×1 brick. Thankfully there is also a Plotz Ellipsoid Generator available on the same site and you can use that and compensate for the shape of a 1×1 brick.

For the sphere I built using LEGO bricks, I used Plotz to create an ellipsoid with a width and depth of 36 units and a height of 30 units. Why did I pick a shape that is a little squat compared to a perfect sphere ? Notice that the ratio of height to width of the ellipsoid is 5/6 which is the inverse of the proportions of a 1×1 LEGO brick (which has a height to width ratio of 6/5). And so when we use LEGO bricks which are taller than they are wide, the proportions even out and we end up with a perfect sphere.

The sphere looks good but it is a little blocky. Is there a way to smoothen the curves – perhaps by using LEGO plates which are 1/3rd as tall as bricks ? We go back to the Plotz Ellipsoid Generator and this time the numbers we use have to reflect the shape of a 1×1 LEGO plate with a height to width ratio of 2/5. I used a height of 50 units and a width of 20 units which gives us a height to width ratio of 5/2. This way when we replace the Minecraft blocks with 1×1 LEGO plates (combined into longer plates as needed) we get a perfect sphere. Looking at this sphere from the side, we can see a definite improvement compared to the earlier sphere. The curves are much smoother thanks to the smaller gradations achieved by using plates instead of bricks. But the limitations of this approach are quite apparent when you turn the sphere and look at it from the top. From this view, the curves once again appear blocky. As it turns out, using plates to build the sphere only makes the curves smoother in one of the three dimensions. Another downside to spheres built by stacking bricks or plates is that the undersides of the bricks and plates are visible when you look at the bottom side of the sphere.

Is there a way to achieve smoother curves in all 3 dimensions without any of those pesky undersides of plates being visible ? If we could take just the top part of this sphere that is smoother and somehow use it in all 3 dimensions (all 6 sides), we would have a sphere that looks smooth all around – correct ? That is exactly the idea that AFOL extraordinaire Bruce Lowell had back in 2002. His invention sort of revolutionized the construction of round shapes (not just spheres) using LEGO, earning him the distinction of being the only AFOL (I know of) to have a building technique named after him – the Lowell Sphere !

Lowell Spheres

A Lowell sphere consists of a SNOT cube (with studs in all directions) with 6 identical curved panels (built using LEGO plates) attached on all 6 sides. Each panel is longer than it is wide allowing the 6 panels to interlock perfectly without any visible gaps. Bruce Lowell’s original Lowell Sphere had a diameter of 6.8 studs and it had an inner core that was 4x4x4 studs wide. But in the years that followed, this technique has taken on a life of its own, finding applications in not just spheres but other complex sculptures as well.

While the original 6.8 stud wide sphere is pretty easy to figure out, how do you apply this technique to build bigger spheres ? Another AFOL who has been key to making this technique accessible to everyone is Bram Lambrecht. He developed Bram’s Sphere Generator which allows you to create a Lowell Sphere with any diameter that you need. Just enter the diameter (in increments of 0.2 studs), tweak a few settings and you are ready to save a Ldraw file that can be imported into stud.io. There is an option to use half stud offsets (jumper plates) to get more detail but I have not found that to be practical for larger spheres. One very useful setting is “use alternating layer colors” and with this selected, different colors are used for the layers of plates that make up each of the 6 identical panels. You may wonder why that is useful. The Ldraw file has sub-models for the 6 panels. But when you release (ungroup) one of these sub-models, you will see that each panel is built entirely out of 1×1 plates. So there is some work involved here, going layer by layer and replacing the 1×1 plates with bigger ones. You have to pick the plates in such a way that the entire panel holds together as one unit (by ensuring that the seams between plates don’t line up between successive layers). The good news is that once you have worked on one panel, you can save it back as a sub-model and use that for all the 6 sides. The Ldraw file also doesn’t include the core and so you will have to build that as a SNOT cube with studs in all 6 directions (just a handful of connection points for each of the 6 panels is usually sufficient).

For the rounded dome of the Taj Mahal, I created a Lowell Sphere with a diameter of 27.2 studs. This is made up of a core that measures 16x16x16 studs and 6 curved panels that are each 14 plates thick (so the diameter is 16 studs + 28 plates which is equivalent to 16 + 11.2 = 27.2 studs). Clearly, I didn’t need the bottom part of the sphere and so I had to truncate it. I ended up removing the bottom panel of the sphere entirely and reducing the height of the core by 2 studs to 14 studs. I also had to crop the bottom portions of the curved panels on the 4 sides (since the panels are oriented two different ways, I had to create two variants of the cropped side panels). The bottom portion of the dome which sits on the drum ended up having a diameter of 16 studs + 22 plates = 24.8 studs which was very close to the outer diameter of the drum (25 studs).

The concept of the Lowell Sphere can be extended to other shapes. Lsculpt also developed by Bram Lambrecht, allows you to convert a 3D model into a LEGO sculpture that is structured much like a Lowell Sphere with a SNOT core (that is not necessarily a cube) that has curved panels attached in all 3 dimensions. Here’s a heart sculpture that I built digitally using Lsculpt.

Conclusion

There are several other ingenious ways of creating round shapes using LEGO that I have not been able to cover here. I am hoping that this post at least gives you a starting point for your own exploration into some of these techniques. I would welcome any questions or suggestions that you may have. Happy building !