Recently I was looking for the best way to create a regular prim in the shape of an equilateral triangle (i.e. a triangle in which all three sides are equal). I specifically needed this kind of triangle to make a floor panel for a six-sided structure, which can be made out of six identical triangles (see image 1). Let’s look at a couple of ways to create a triangle.

## Using the Prism *building block type*

This is the method I ended up using for my floor panel. It just involves two quick steps:

- Create a simple box.
- When the box rezzes, and with the box still selected, click on the Object tab in the build tool. Locate the “Building block type” selection list, and change its value to Prism. (image 2)

I used this method, because it instantly gives you an equilateral triangle. It will stay equilateral as long as you keep the shape’s X and Y sizes equal, and it will rotate neatly around the triangle’s center (also called centroid or center of gravity). This is an important difference with other ways to make a triangle, as we will see below.

## Using the Prism *default shape*

An obvious way to make a triangle is to take the second shape in the list of available base shapes. Confusingly, this shape is called Prism too. Please note the difference between the **Prism building block type** (which we used in the previous paragraph), and the **Prism shape**, which actually uses a Box as its building block type (image 3).

The box you get has been sheared and tapered to create the triangular shape. This is okay for triangle shapes that need a 90-degree angle. However, an equilateral triangle has three 60-degree angles, and the 90-degree angle in this shape will not change when you resize the prim. (see image 4)

## Calculating the right triangle size

The 90-degree angle is caused by the *Top shear* value. When you change the top shear X and Y values back to zero, the triangle starts to look better. It’s too tall though: to change it into a perfect equilateral triangle, you need to calculate the height of the prim. If you want to try this, do the following (see image 5).

- Create a default box (sized 0.5 x 0.5 x 0.5).
- Make sure the
*Top shear*values are zero. - Set the
*Taper X*value to 1.00. - Change the Z size value (the triangle’s height) to 0.433.

The height calculation is not difficult, but it takes some extra work, compared to the first method. Besides this, there is another drawback of this approach. This becomes apparent when you need to rotate some triangles in order to create a pattern. If you use this type of triangle, it won’t stay aligned with adjacent triangles, because it has an awkward center of rotation. Since the shape is still based on a box, it will rotate around the center of the box (image 6), rather than the center of the triangle, which you get with the prism building block (image 7).

## Conclusion

For equilateral triangles, start with the Prism building block type. For triangles with a right angle, use the Prism default shape.

Happy building with triangles!