Geometry
Generic geometry for simulations.
Description
The geometry of a simulation is specified using volumes filled with media. A Geometry metatype is specialised in representing volumes with a specific shape or a familly of shapes. For example:
- the EarthGeometry can represent an Earth topography using data from one or more Digital Elevation Models (DEMs).
- The InfiniteGeometry represents a volume of infinite extension filled with a single medium.
- The PolyhedronGeometry allows to represent a collection of imbricated convex polyhedrons.
Geometries can be nested using the Geometry.insert
method following the same
semantic than the table.insert
function. A nested (daughter) geometry has
precedence over its mother on the sub-space delimited by its volume. An
arbitrary number of daughters can be nested but they must not overlap with each
other nor out of the mother volume. The Geometry.remove
method allows to
withdraw a daughter geometry.
Examples
-- Initialise the world geometry as an infinite volume filled with air
local world = pumas.InfiniteGeometry('Air')
-- Insert an Earth filled with water into the world geometry
world:insert(pumas.EarthGeometry{medium = 'Water', data = 0})