#include <View.H>
#include <TensorBlossom.H>
using namespace xchen;
void bspcircle(View* v)
{
TensorBlossom<1,4> *circle = new TensorBlossom<1,4>(2,8);
double w = sqrt(2.0) / 2;
E4 p(1, 0, 0, 1);
circle->ControlMesh() =
p,
rY(45)(p).Syw(w),
rY(90)(p),
rY(135)(p).Syw(w),
rY(180)(p),
rY(225)(p).Syw(w),
rY(270)(p),
rY(315)(p).Syw(w);
circle->IsRational() = true;
circle->SetPeriodicEnd();
circle->KnotVector() = 0.,0, 1, 1, 2, 2, 3, 3, 4;
new glModel(v, circle);
}
void new_glModel(View* v)
{
bspcircle(v);
}