The geometry classes use the vector classes. In this document, `vector', `point' and `centre' imply objects of type `Vector'.
type_name parameters
| type_name | parameters |
|---|---|
| plane | normal_vector (n) family_parameter (f=n.r : r = point_in_plane) |
| 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 |
Vector average(
const Array& v, // array of position vectors
const Array& w // array of weights
)
Plane best_fitting_plane(
const Array& r, // Array of position Vectors
const Vector& f, // Array of function values
const Vector& w // Array of weights
)
Returns a plane whose normal has no components if it fails.
Sphere best_fitting_sphere(
const Array& r, // Array of position Vectors
const Vector& w // Array of weights
)
Returns a sphere whose centre has no components if it fails.
Ellipsoid best_fitting_ellipsoid(
const Array& r, // Array of position Vectors
const Vector& w // Array of weights
)
Returns an ellipsoid whose centre has no components if it fails.
Ellipsoid best_fitting_ellipsoid(
const Vector& c, // centre
const Array& r, // Array of position Vectors
const Vector& w // Array of weights
)
Returns an ellipsoid whose centre has no components if it fails.