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<Vector>& v, // array of position vectors const Array<double>& w // array of weights )
Line best_fitting_Line( const Array<Vector>& r, // array of position vectors const Vector& w // array of weights )Assumes line is not normal to coordinate axis exhibiting greatest variation, and calculates best-fitting straight line of other coordinates with respect to this one.
Plane best_fitting_plane( const Array<Vector>& r, // array of position vectors const Vector& f, // array of function values const Vector& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns a plane whose normal has no components if it fails.
Plane best_fitting_plane( const Array<Vector>& r, // array of position vectors const Vector& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns a plane whose normal has no components if it fails.
Sphere best_fitting_sphere( const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns a sphere whose centre has no components if it fails.
Sphere best_fitting_sphere( const Vector& c, // centre const Array<Vector>& r, // array of position vectors const Array<double>& w // array of weights )Returns a sphere whose centre has no components if it fails.
Cylinder best_fitting_cylinder( const Vector& p, // point on axis const Vector& a, // axis vector const Array<Vector>& r, // array of position vectors const Array<double>& w // array of weights )
Cylinder best_fitting_cylinder( const Vector& c, // centre const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )
Cylinder best_fitting_cylinder( const Vector& a, // axis vector const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Operates by projecting points onto a plane normal to specified axis, then finding the best-fitting sphere in that plane to define centre (thus point on axis) and radius.
Cone best_fitting_cone( const Vector& p, // point on axis const Vector& a, // axis vector const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns a cone whose axis has no components if it fails. Apex of cone is adjusted along axis to improve fit.
Gencone best_fitting_gencone( const Vector& p, // point on axis const Vector& a, // axis vector const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns a generalised cone whose axis has no components if it fails. Apex of cone is adjusted along axis to improve fit.
Ellipsoid best_fitting_ellipsoid( const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns an ellipsoid whose centre has no components if it fails.
Ellipsoid best_fitting_ellipsoid( const Vector& c, // centre const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns an ellipsoid whose centre has no components if it fails.
Genellipsoid best_fitting_genellipsoid( const Array<Vector>& axis, // axes const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns an ellipsoid whose centre has no components if it fails.
Genellipsoid best_fitting_genellipsoid( const Vector& c, // centre const Array<Vector>& axis, // axes const Array<Vector>& r, // array of position vectors const Array<double>& w, // array of weights const double eps = 1.0e-8 // bandwidth: singular problem )Returns an ellipsoid whose centre has no components if it fails.
double angsub3d( const Vector3d& p, // position vector of point where angle is calculated const Vector3d& a, // position vector of first point of triangle const Vector3d& b, // position vector of second point of triangle const Vector3d& c, // position vector of third point of triangle const double eps = 1.0e-8 // numerical bandwidth: small triangle )
double angsub2d( const Vector2d& p, // position vector of point const Vector2d& a, // position vector of first end of line const Vector2d& b, // position vector of second end of line const double eps = 1.0e-8 // numerical bandwidth: line ends close to point )