XSight RT provides predefined classes for some common *convex polyhedra*:

- Tetrahedron (regular, four triangular faces)
- Octahedron (regular, eight triangular faces)
- Dodecahedron (regular, twelve pentagonal faces)
- Icosahedron (regular, twenty triangular faces)
- Pyramid (not regular, rectangular base, four additional triangular faces)

All these polyhedra, except the pyramid, are *regular polyhedra*: all their faces have the same shape and size. You can also defined these and any other convex polyhedra by intersecting planes. However, these predefined classes render faster and have better bounds.

Every **tetrahedron** has four triangular congruent faces. The only parameter needed to define a tetrahedron is the material:

- Tetrahedron(material)

The resulting tetrahedron is centered around the origin of coordinates, and its lower face is initially parallel to the XZ plane. You can rotate, resize and translate it as you need.

Every **octahedron** has eight triangular and congruent faces. The only parameter needed to define an octahedron is the material:

- Octahedron(material)

The octahedron is centered around the origin of coordinates, as shown in the following image:

A **dodecahedron** features twelve pentagonal and congruent faces. The only parameter needed to define a dodecahedron is the material:

- Dodecahedron(material)

Dodecahedra defined this way are always centered around the origin of coordinates, as shown in the following image:

An **icosahedron** features twenty triangular congruent faces. The only parameter needed to define an icosahedron is the material:

- Icosahedron(material)

Icosahedra defined this way are always centered around the origin of coordinates, as shown in the following image:

Though **pyramids** are not regular polyhedra, we provide a shortcut for handling rectangular-based pyramids. The provided class renders faster, and their instances have better bounds. You'll need the base length, the pyramid's height and a material for defining a *pyramid*:

- Pyramid(side, height, material)

Home | Small Instantiation Language overview | Scenes | Solid shapes | Sphere | Box | Cone | Cylinder | Torus | Blob | Surfaces | Transforms | CSG operations