number_of_components For each: component_value
Lineposition_vector_on_line direction_vector_along_line
SurfaceA surface is considered to have an inside and an outside, for use in defining solid regions. Unless stated otherwise, the inside is what you would intuitively expect, e.g. the inside of a sphere or a cone. The inside of a plane is chosen to be the opposide side to the direction of the normal (i.e. plane normals point outward).
Polymorphic input and output is provided for pointers to objects of this class. Polymorphic data format:
type_name parameters
| type_name | parameters |
|---|---|
| plane | normal_vector (n) family_parameter (f=n.r : r = point_in_plane) |
| plane_point | normal_vector (n) point_in_plane(r) |
| cylinder | point_on_axis axis_vector radius |
| cone | point_on_axis axis_vector half_angle (radians) |
| general_cone | point_on_axis axis_vector half_angle (radians) radius_at_point_on_axis |
| sphere | centre radius |
| ellipsoid | centre radius_1 radius_2 ... radius_N |
| general_ellipsoid | centre axis_vector_1 axis_vector_2 ... axis_vector_N radius_1 radius_2 ... radius_N |
| cuboid | low_corner high_corner (N-vectors) |
| polygon (xy plane, closed) | N p_1 p_2 ... p_N (2-vectors) |
function
function_type_name parameters
function_bandwidth
minimum_line_parameter maximum_line_parameter line_parameter_step
Based on a Realfunctionnd, which defines
a function value everywhere in space - i.e. as a function of the position
vector - see the ND function documentation.
The surface is where the function is zero;
inside is where the function is negative.
The bandwidth is a small number, used when funding the zeroes
to say when the function is sufficiently close to zero.
When funding the intersection with a line,
intersections are sought in the region of the line between the parameter
limits chosen, with the desired step.
(If the function value changes sign between the ends of a step,
bisection is used to find the position of the surface in between.)
surface_of_revolution
reference_point_on_axis axis_vector
radius_function_type_name parameters
minimum_line_parameter maximum_line_parameter line_parameter_step
Based on a Realfunction1d, which defines
the radius as a function of the line parameter along the axis from the
reference point
- see the 1D function documentation.
(If the axis is a unit vector, the line parameter is distance.)
When funding the intersection with a line,
intersections are sought in the region of the line between the parameter
limits chosen, with the desired step.
(If the radius difference changes sign between the ends of a step,
linear interpolation in radius vs line parameter is used to estimate the
intersection point.)
outsidetype_name parameterssubset
type_name parameters
number_of_constraints
For each:
type_name parameters
Defines a subset of a surface.
The subset is described as a set of constraints.
Each constraint is itself a surface;
the subset is the part of the surface which lies inside all
the constraining surfaces.
intersection
number_of_surfaces
For each:
type_name parameters
Defines the intersection of a set of surfaces,
in the sense of the smallest region lying inside all the surfaces.
union
number_of_surfaces
For each:
type_name parameters
Defines the union of a set of surfaces,
in the sense of the region lying inside any of the surfaces.
translate
translation_vector
surface_type_name parameters
Translates a surface by the specified vector.
map
map_matrix
surface_type_name parameters
Maps a surface by applying the matrix to the coordinate system
in which the surface is defined.
If the surface is defined with respect to a set of axes
which are not aligned with the coordinate axes,
the mapping matrix is the set of scalar products between the two sets
of axes.
The axes need not be orthogonal: the map can be used to stretch or shear
a surface.