You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sebastiaan Lokhorst edited this page Aug 5, 2016
·
3 revisions
The geometry used by the simulator consists of triangles with an inner and outer material.
Geometry file
Geometries are defined in text files consisting of lines with 9 columns:
mat_in mat_out Ax Ay Az Bx By Bz Cx Cy Cz
Each line describes a single triangle.
mat_in and mat_out are integers material indices defining which material is inside (in the direction against the normal) and outside (in the direction with the normal) of the triangle.
Ax through Cz are the x, y and z components of the vertices A, B and C of the triangle.
The normal is defined as n = (B-A)⋅(C-A).
The materials mat_in and mat_out must be a 8-bit signed integer between -128 and 127. The values below zero have a special meaning. The numbers zero and above are materials.
ID
type
-128
NOP
-127
TERMINATOR
-126
DETECTOR
-125
DETECTOR_LT50
-124
DETECTOR_GE50
-123
VACUUM
-122
MIRROR
...
...
0
material 0
1
material 1
2
material 2
...
...
127
material 127
Create a geometry
Run bin/line-gen > geometry.tri to generate a sample geometry consisting of lines and spaced. Use the --help flag to see what options are available.