#include <View.H> #include <TensorBlossom.H> using namespace xchen; void srf_cmpl(View* v) { TensorBlossom<1,3> *boundary = new TensorBlossom<1,3>(3, 5); boundary->ControlMesh() = E3( -1.02632, 0.0740132, 0 ), E3( 0.302632, 0.669408, 0 ), E3( 0.476974, 0.284539, 0 ), E3( 0.328947, -0.777961, 0 ), E3( -0.891447, -0.606908, 0 ); boundary->SetPeriodicEnd(); TensorBlossom<1,3> *maxis = new TensorBlossom<1,3>(1, 6); E3 mpoint0 = E3(-0.493421, -0.202303, 0), mpoint1 = mpoint0, mpoint1a = E3(-0.161184, -0.146382, 0), mpoint2 = E3( 0.141447, 0.245066, 0), mpoint3 = mpoint2, mpoint4 = mpoint1a; maxis->ControlMesh() = mpoint0, mpoint1, mpoint1a, mpoint2, mpoint3, mpoint4; maxis->SetPeriodicEnd(); maxis->KnotVector() = 0., 1, 1.4, 2, 3, 4, 5; TensorBlossom<2,3> *srf = new TensorBlossom<2,3>(ruled, boundary, maxis); new glModel(v, srf); } void new_glModel(View* v) { srf_cmpl(v); } // mpoint0 : pt(-0.493421, -0.202303, 0 ); // mpoint1 : mpoint0; // mpoint1a: pt( -0.161184, -0.146382, 0 ); // mpoint2 : pt( 0.141447, 0.245066, 0 ); // mpoint3 : mpoint2; // mpoint4 : mpoint1a; // mcurve1 : curve( 2, "ec_periodic", knotVector(0,1,1.4,2,3,4,5) ,array(mpoint0,mpoint1,mpoint1a,mpoint2,mpoint3,mpoint4)); // ref_curve1 : cRefine(curve1,cKv(mcurve1),false); // srf : ruledSrf(ref_curve1,mcurve1); // isocrv0: crvInSrf(srf,"row",0); // show(isocrv0); // isocrv1: crvInSrf(srf,"row",.25); // show(isocrv1); // isocrv2: crvInSrf(srf,"row",.5); // show(isocrv2); // isocrv3: crvInSrf(srf,"row",.75); // show(isocrv3); // isocrv4: crvInSrf(srf,"row",1.0); // show(isocrv4); // curve4 : curve( 4, "ec_periodic", "kv_uniform", array( point1, point2, point3, point4, point5 ) ); // open_mcurve1:crvOpen(mcurve1); // raised_mcurve1:raiseCrvOrder(open_mcurve1,4); // open_curve4:crvOpen(curve4); // ref_curve4: cRefine(open_curve4,cKv(raised_mcurve1),false); // surf4: ruledSrf(ref_curve4,raised_mcurve1); // cisocrv0: crvInSrf(surf4,"row",0); // show(cisocrv0); // cisocrv1: crvInSrf(surf4,"row",.25); // show(cisocrv1); // cisocrv2: crvInSrf(surf4,"row",.5); // show(cisocrv2); // cisocrv3: crvInSrf(surf4,"row",.75); // show(cisocrv3); // cisocrv4: crvInSrf(surf4,"row",1.0); // show(cisocrv4);
1.2.18