Shapes: polyhedra

XSight RT provides predefined classes for some common convex polyhedra:

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.

Tetrahedron

Every tetrahedron has four triangular congruent faces. The only parameter needed to define a tetrahedron is the 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.

Octahedron

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

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

Dodecahedron

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

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

Icosahedron

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

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

Pyramid

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:

See also

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