#include <View.H>
#include <TensorBlossom.H>
using namespace xchen;
void bspsph_rev(View* v)
{
double w = sqrt(2.0) / 2;
E4 p(0, -1, 0, 1);
TensorBlossom<1,4> *halfcircle = new TensorBlossom<1,4>(2,5);
halfcircle->ControlMesh() =
p,
rZ(45)(p).Szw(w),
rZ(90)(p),
rZ(135)(p).Szw(w),
rZ(180)(p);
halfcircle->IsRational() = true;
halfcircle->KnotVector() = 0.,0, 1, 1, 2, 2;
TensorBlossom<2,4> *sph = new TensorBlossom<2,4>(revolution, halfcircle);
new glModel(v, sph);
sph->Subdivide(5);
}
void new_glModel(View* v)
{
bspsph_rev(v);
}