20 #ifndef vsr_cga3D_round_INC
21 #define vsr_cga3D_round_INC
25 #include "space/vsr_cga3D_types.h"
27 namespace vsr {
namespace cga {
55 static Point null(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z);
59 static Point point(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z);
73 static DualSphere dualSphere( VSR_PRECISION r, VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z);
79 static DualSphere dls( VSR_PRECISION r, VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z ){
155 static VSR_PRECISION
size(
const DualSphere& s,
bool bDual =
true);
162 static VSR_PRECISION
size(
const Pair& s,
bool bDual=
true);
169 static VSR_PRECISION
size(
const Circle& s,
bool bDual=
false);
176 static VSR_PRECISION
size(
const Sphere& s,
bool bDual =
false);
203 template<
class T>
static VSR_PRECISION
rad(
const T& t) {
return radius(t); }
211 VSR_PRECISION r =
rad( s );
212 return (r==0) ? 10000 : 1.0 /
rad(s);
247 static std::vector<Point>
split(
const Pair& pp);
266 return split( nc.dual() );
419 static Vec vec(
const Circle& c, VSR_PRECISION theta = 0);
531 static VSR_PRECISION
wt(
const DualLine& f,
bool bDual=
true);
538 static Line line( VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z );
541 static Circle dline( VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z );
static std::vector< Point > split(const Pair &pp)
Split Points from Point Pair.
static DualSphere dls(VSR_PRECISION r, VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Dual Sphere from Coordinate Center (shorthand)
Definition: vsr_cga3D_round.h:79
static DirectionVector direction(const Pair &p)
Direction of a Pair.
static Vec vec(const Circle &c, VSR_PRECISION theta=0)
Euclidean Vector of Circle at theta.
static std::vector< Point > splitLocation(const Pair &pp)
Split Points from Point Pair and normalize.
static DualSphere at(const Point &c, const Point &p)
Dual Round from Center and Point on Surface.
static DualSphere dualSphere(VSR_PRECISION r, VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Dual Sphere from Coordinate Center.
static Line line(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Direct Line at origin with coordinate v ...
static DualPlane plane(const Point &pnt, const DirectionVector &drv)
Dual Plane from Point and Direction.
static Point center(const DualSphere &s)
Simple Center of A Round (not normalized – use loc or location method instead)
static Line carrier(const Pair &p)
Carrier Flat of Pair.
static VSR_PRECISION dsize(const Point &dls)
Squared Size of Normalized Dual Sphere (faster than general case)
Generic Geometric Number Types (templated on an algebra and a basis )
Definition: vsr_algebra.h:69
static VSR_PRECISION sqd(const Point &a, const Point b)
Squared distance between two points.
Definition: vsr_cga3D_round.h:233
static DualSphere sur(const A &s)
Dual Surround of a Direct or Dual Round Element (Shorthand)
Definition: vsr_cga3D_round.h:347
static auto car(const A &s) -> decltype(carrier(s))
Carrier Flat of Direct? Round Element (Shorthand)
Definition: vsr_cga3D_round.h:327
static Point loc(const A &a, const Point &p, bool dual)
Location of flat (shorthand)three-letter version of cga::Flat::location.
Definition: vsr_cga3D_round.h:523
static Point loc(const A &s)
Location (normalizd) of a Round Element (shorthand)
Definition: vsr_cga3D_round.h:146
3D operations on Round types (Points, Point Pairs, Circles, Spheres)
Definition: vsr_cga3D_round.h:42
core namespaced operations that are metric-agnostic
static DirectionVector direction(const Line &f)
Direction of Line.
3D operations on Flat types
Definition: vsr_cga3D_round.h:442
static Point location(const A &s)
Location (normalized) of A Round Element (normalized) (Shorthand)
Definition: vsr_cga3D_round.h:136
static DualSphere surround(const Pair &s)
Dual Surround of a Direct or Dual Pair.
static Point cen(const A &s)
Simple Center of a Round Element (shorthand)
Definition: vsr_cga3D_round.h:128
static Pair at(const Circle &r, const Point &p)
Tangent Element of A Circle at Point p.
static auto dir(const A &s) -> decltype(direction(s))
Direction of Round Element (shorthand)
Definition: vsr_cga3D_round.h:301
static VSR_PRECISION rad(const T &t)
Squared Size of a DualSphere (result could be negative)
Definition: vsr_cga3D_round.h:203
static std::vector< Point > split(const Circle &nc)
Split A Circle into its dual point pair poles.
Definition: vsr_cga3D_round.h:265
static VSR_PRECISION curvature(const A &s)
Curvature of Round.
Definition: vsr_cga3D_round.h:210
static VSR_PRECISION squaredDistance(const Point &a, const Point b)
Squared distance between two points.
static VSR_PRECISION radius(const DualSphere &s)
Radius of DualSphere.
static VSR_PRECISION wt(const DualLine &f, bool bDual=true)
Weight of DualLine.
static VSR_PRECISION dist(const Point &a, const Point &b)
Distance between points a and b (shorthand)
Definition: vsr_cga3D_round.h:239
static VSR_PRECISION cur(const T &t)
Curvature of Round.
Definition: vsr_cga3D_round.h:219
the versor library namespace
Definition: vsr_algebra.h:29
3D operations on Tangent types
Definition: vsr_cga3D_round.h:555
static DualSphere sphere(const Point &v, VSR_PRECISION r=1.0)
Dual Sphere from Element FIRST and Radius.
static Pair produce(const DualSphere &dls, const Vec &v)
Pair From DualSphere and Euclidean subspace Bivector Note: Result will be imaginary if input DualSphe...
static VSR_PRECISION size(const DualSphere &s, bool bDual=true)
Squared Size of a DualSphere (result could be negative)
static Point point(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Null Point from Coordinates.
static VSR_PRECISION distance(const Point &a, const Point b)
Distance between points a and b.
static VSR_PRECISION wt(const TangentVector &s)
Weight of TangentVector.
static auto dir(const A &s) -> decltype(direction(s))
direction shorthand
Definition: vsr_cga3D_round.h:467
static Pair pair(const Circle &c, VSR_PRECISION t)
Point Pair on Direct Circle at angle t.
static Point location(const DualLine &f, const Point &p, bool dual=true)
Location of DualLine closest to Point p.
static Point null(const Vec &v)
Null Point from a vec.
static Circle dline(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Direct hyperbolic d-Line at origin with coordinate v ...