Ellipsoid
An ellipsoid can be constructed using C++ or some simple text:
:volu ellipsoid ELLIPSOID
10 // semi axis in x [mm]
20 // semi axis in x [mm]
50 // semi axis in x [mm]
-10 // lower limit on z [mm]
40 // upper limit on z [mm]
G4_WATER // 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/ellipsoid
# generate animated picture, ellipsoid.gif
G4VIS_DEFAULT_DRIVER=TSG_FILE gears gears.mac