The Math Behind LEGO Building Techniques – Volume 4

This installment in my series “The Math Behind LEGO Building Techniques” (see Volume 1, 2, 3 here) will include an assortment of items related to topics that have already been covered in this blog or my book. They are mostly updates arising from new terms or new LEGO pieces that have been introduced since the last installment was published.

About the “sugar grid” …

You’ve probably been hearing or reading about the “sugar grid” technique for placing LEGO pieces at angles. This term was coined by Chris Enockson who has an excellent and fast-growing Youtube channel Brick Sculpt that talks about building techniques, among other LEGO-related topics. There’s also a highly informative and well-received article by Arno Knobbe on this topic that was posted on New Elementary. So how does the “sugar grid” fit into the framework of angled wall techniques that have been discussed on this blog (and were covered in my book)? Let’s find out!

Mathematically speaking, all the techniques for attaching LEGO pieces at angles other than 0° and 90° involve right triangles. The most common of these techniques involves placing a LEGO brick or plate along the hypotenuse (the longest side which is opposite the right angle) of a single right triangle. For this to work, the length of the hypotenuse has to be a whole number of studs (see Pythagorean triples) or close enough to one (see near triples). However, since the number of useful Pythagorean triples and near triples is quite small, this greatly limits our options and the angles we can create.

There’s another group of techniques that involves two right triangles that share a hypotenuse. We do not place any LEGO pieces along this hypotenuse, and so its length does not have to be a whole number. Instead, we create angled walls by placing LEGO pieces along the sides that make up the right angles in the two triangles. This opens up many more possibilities because it works for right triangles with any arbitrary (whole number) side lengths.

Two of the techniques covered in this blog (the “mirrored hypotenuse” technique and the “switched diagonals” technique) are essentially based on this concept which Chris and Arno have generalized into what they call the “sugar grid”. To better understand how this works, let’s start with a simple 2×3 plate A and consider the right triangle formed by the studs numbered 2, 3 and 4. The two sides that make up the right angle are 2 and 1 studs long (measuring the distance between the studs 2-3 and 3-4). The length of the hypotenuse (2-4) is √22+12 = √5 which, of course, is not a whole number. Next, take a second 2×3 plate B, and consider the right triangle formed by studs 1, 2 and 3. The two identical (but mirrored) right triangles have hypotenuses (2-4 and 1-3) that are identical in length.

So you should be able to rotate plate B such that its hypotenuse 1-3 lines up with the hypotenuse 2-4 on plate A and attach the two 2×3 plates together using 1×1 round plates as spacers. There are in fact, 4 identical right triangles that share the same hypotenuse; two on the original 2×3 plate and two on the rotated 2×3 plate. The angle of rotation is 53.13° which is twice the smaller angle in each right triangle.

This gives you another way to create angled walls without limiting you to Pythagorean triples. You’re still limited to the angles that can be created for various whole number side lengths of the right triangles, but there are many more options available. Arno’s article mentions Legal LEGO Angle Finder which is a tool that helps you pick the right plate sizes to use for the angle you want to create. It’s also possible to stack plates in multiple layers, each with their own rotation, for even more options.

Now, imagine the triangle from the first 2×3 plate repeating across the entire LEGO grid. We can again call this grid A. Similarly, grid B would have the triangle from the second 2×3 plate repeated.

It should be possible to rotate grid B and overlay it on grid A such that the studs at the ends of the hypotenuses of the right triangles line up. The rest of the studs on grid B will not line up with the studs on grid A, but the studs at the ends of the hypotenuses can serve as connection points between the two grids. This sparser grid of connection points allows LEGO elements to be attached in one of two orientations (aligned with either grid A or grid B).

This is the concept of the “sugar grid”. As expected, as the sides of the right triangles increase in length, the “sugar grid” gets sparser (the number valid connection points decreases as a proportion of the total number of available studs in each grid).

So where does the term “sugar grid” come from anyway? Apparently its origins are from Minecraft, which isn’t something I am very familiar with. But I was curious to find the connection anyway. Here’s what I was able to glean from a little bit of research (more experienced Minecrafters can feel free to correct me). In Minecraft, sugarcane farming is important because sugarcane is a valuable resource that can be used to create a variety of other things. Sugarcane obviously needs water to grow.

A common challenge in sugarcane farming is to place sugarcane blocks (represented by the green squares) in the most efficient way such that each one is adjacent to a water block (represented by the blue squares). This can be achieved by tiling any given area with a plus shaped pattern with a water block in the center surrounded by sugarcane blocks on all 4 sides. This way, you end up with the water blocks placed in a grid that resembles the grid of connection points that we saw earlier (the image below shows the sugarcane grid recreated using LEGO 1×1 tiles). Hence the name “sugar grid”. The connection may be tenuous, but I can’t disagree with the fact that “sugar grid” is a catchy and intriguing name to describe the concept.

As Arno shows us in his article, the concept of the “sugar grid” doesn’t limit you to just regular studs-up building. In a clever example, he shows how it can be extended to sideways building aka SNOT as long as you can get the sideways studs to be spaced correctly to conform to the “sugar grid”. The studs here again form the hypotenuses of right triangles with side lengths of 2 and 1 studs.

Arno’s article also mentions an official LEGO set (The Lord of the Rings: Rivendell 10316) that utilizes a “sugar grid” connection. Are you aware of any others?

Technic connector #2.5?

In the most recent volume of The Math Behind LEGO Building Techniques, I had covered the family of Technic angled connectors #1 through #6 that allow you to connect axle pieces at various angles ranging from 90° (#6) to 180° (#2). These connector pieces have been in the LEGO catalog since the late 1990s. So it was quite surprising to see a new member joining this family in 2024 – Technic Axle and Pin Connector Angled #7 – 168.75° (4450). This part has only been used in a handful of sets so far. I have not studied the instructions for these sets to see what the compelling reason was to create a new connector, but it’s definitely an interesting piece.

The one thing that doesn’t make sense with this new connector is the number (#7) assigned to it, and I would even argue that the number should have been #2.5. Confused? If you take a closer look at connectors #2 through #6 and the angles they create, you will see that these angles are separated by increments of 22.5° (which is a quarter of 90°). In fact, for all the connectors except #1 you can get the angle that they create using the formula 225° – n x 22.5° where n is the connector number. If you use this formula for the angle created by the new connector (168.75°), the value of n comes out to be 2.5. But I guess it was easier for LEGO to just name it #7. Here’s an updated table that shows the Technic connectors including connector #7.

NumberPart NumberAngle
132013–
232034180°
332016157.5°
432192135°
532015112.5°
63201490°
74450168.75°

While the angle 168.75° may seem quite random, it really isn’t. It happens to be the interior angle of a regular polygon with 32 sides. You can determine this by solving for n (the number of sides) the equation for the internal angle (n-2) * 180° / n = 168.75° (see more about polygon geometry here). If you use 32 of these connectors and axles you can create a much smoother approximation of a circle than is possible with the other connectors (especially the #3 connector used to create a 16-sided polygon in the Globe set I covered in the article). The resulting diameter is of course, going to be bigger. So is it possible to use the new connector to create a bigger version of the Globe set? The first step would be to create a frame which as it turns out, has a diameter of 64 studs (see the image). It will be a lot more tricky to create the outer skin using wedge plates for this bigger version, but it is something I will be looking into. Stay tuned!

A few new slopes

LEGO continues to expand their catalog of slope pieces and a few recent additions have been particularly noteworthy. They are 3 slopes that are 2, 4 and 6 studs long with no studs on top. The three new additions to the slope family are the 2×1 slope (#5404) that is 2 plates tall, 4×1 slope (#5654) and 6×1 slope (#4569), the last two of which are 3 plates (or 1 brick) tall. If the new 2×1 slope looks familiar, that is because a version with a grille (#61409) also known as the “cheese grater” has been available since 2008. LEGO finally decided to give us a version of this slope piece without the grille.

So what angles do these new slope pieces create? Like most other slope pieces, they have a lip at the bottom of the slope that is half a plate high. The 2×1 slope rises approximately 2-0.5 = 1.5 plates over 2 studs which makes its angle arctan(1.5/5) = 16.7°, but the official name of the slope from Bricklink rounds this off to 18°. This slope also has a groove at the bottom (much like the 1×1 cheese slope) which makes it easier to pry the piece off without ruining your fingernails. Looking at the new 4×1 and 6×1 slopes, they rise 3-0.5 = 2.5 plates over 4 and 6 studs respectively making their angles arctan(2.5/10) = 14° and arctan(2.5/15) = 9.46° respectively (the latter of which is rounded off to 10° in the official Bricklink name).

The half plate lip means that you have to resort to some SNOT to get a smooth slope using two or more of these elements.

Here are all 3 types of slopes side by side showing the subtly different angles they create.

But one interesting side effect of the half plate lip is that the 4×1 and 6×1 slopes have a sloping portion that is 2.5 plates high which make the slopes line up almost perfectly with the 4×2 (#41769, #41770) and 6×2 (#78443, #78444) wedge plates attached sideways.

LEGO has already used these new slopes to great effect in several official sets including Marvel Logo & Minifigures 76313 where all three slopes are used to create the letters in the logo. I am sure MOC builders will also find these new slopes to be a useful addition to their arsenal.

Addendum: Luca Hermann (a very talented builder from Germany) pointed out that in the new 4×1 and 6×1 slopes, the “half plate lip” is a little taller than half a plate. It’s somewhere between 0.25 and 0.3 studs (0.625 and 0.75 plates). This would make the angle of the 6×1 slope more like 9° and may explain the slight stair-stepping that is seen when we use SNOT to try to create a smooth slope using two or more of the 6×1 slopes. Luca has verified this by using 40 of these slopes to create a perfect circle (40 x 9° = 360°) in a recent MOC (shown below is the round base of the Washington Monument that he designed).

Until the next installment, happy building!

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 !