Tetrahedra
A tetrahedra can be constructed using C++ or some simple text:
:volu tetrahedra TET
0 0 sqrt(3) // x, y, z of anchor point
0 2*sqrt(2/3) -1/sqrt(3) // x, y, z of point 2
-sqrt(2) -sqrt(2/3 -1/sqrt(3) // x, y, z of point 3
sqrt(2) -sqrt(2/3 -1/sqrt(3) // x, y, z of point 4
G4_AIR // material
The full source code is in detector.tg, which can be visualized using the macro file mingle.mac or gears.mac, assuming an universal Geant4 application, such as MinGLE or GEARS, is available:
git clone https://github.com/jintonic/geant4
cd geant4/detector/CSG/tetrahedra
# generate animated picture, tetrahedra.gif
G4VIS_DEFAULT_DRIVER=TSG_FILE gears gears.mac