10 #ifndef VSR_H_FOLD_INCLUDED
11 #define VSR_H_FOLD_INCLUDED
14 #include "form/vsr_set.h"
15 #include "form/vsr_rigid.h"
17 namespace vsr{
namespace cga{
27 static vector<Line> Lines(
const Point& a,
const Point& b,
const Point& c){
29 vl.push_back( (a ^ b ^
Inf(1)).runit() );
30 vl.push_back( (b ^ c ^
Inf(1)).runit() );
31 vl.push_back( (c ^ a ^
Inf(1)).runit() );
38 vl.push_back( (a ^ b ^
Inf(1)).runit() );
39 vl.push_back( (b ^ c ^
Inf(1)).runit() );
40 vl.push_back( (c ^ d ^
Inf(1)).runit() );
41 vl.push_back( (d ^ a ^
Inf(1)).runit() );
46 static vector<Line> Lines(
const vector<Point>& src ){
48 for (
int i = 0; i < src.size()-1; ++i){
49 vl.push_back( ( src[i] ^ src[i+1] ^
Inf(1) ).unit() );
51 vl.push_back( (src.back() ^ src[0] ^
Inf(1) ).unit() );
56 static vector<Line> Lines(
Point * src,
int num ){
58 for (
int i = 0; i < num -1; ++i){
59 vl.push_back( ( src[i] ^ src[i+1] ^
Inf(1) ).unit() );
61 vl.push_back( (src[num-1] ^ src[0] ^
Inf(1) ).unit() );
66 static vector<Line> Lines(
const Point& center,
const vector<Point>& nodes){
70 vl.push_back( ( center ^ i ^
Inf(1) ).unit() );
77 static vector<Line> Bisect(
const vector<Line>& lines ){
79 vl.push_back( (lines.back() - lines[0]).unit() );
80 for (
int i = 0; i < lines.size()-1; ++i){
81 vl.push_back( ( lines[i] - lines[i+1] ).unit() );
86 static Point Meet (
const vector<Line>& lines) {
94 static vector<Point> Perpendiculars(
const Point& c,
const vector<Line>& lines){
98 vp.push_back(
Flat::loc(i, c,
false).null() );
105 static vector<Circle> Circles(
const vector<Point>& src,
const vector<Line>& crease ){
107 for (
int i = 0; i < src.size(); ++i) {
108 vc.push_back( src[i] ^ crease[i].dual() );
static Circle meet(const Dls &s, const Dls &d)
circle intersection of dual spheres
Common Operations Specific to CGA3D.
Generic Geometric Number Types (templated on an algebra and a basis )
Definition: vsr_algebra.h:69
Multivector< algebra, typename algebra::vector_basis > null() const
Conformal Mapping \(\boldsymbol(x)\to n_o + \boldsymbol{x} + \boldsymbol{x}^2n_\infty \) ...
Definition: vsr_generic_op.h:1118
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
NInf< 5 > Inf
Infinity
Definition: vsr_cga3D_types.h:68
the versor library namespace
Definition: vsr_algebra.h:29
Definition: vsr_fold.h:24