#include <View.H> #include <TensorBlossom.H> using namespace xchen; void srf_cmpl(View* v) { TensorBlossom<1,3> *boundary = new TensorBlossom<1,3>(3, 19); boundary->ControlMesh() = E3( -0.741538, -0.378462, 0 ), E3( -0.458462, -0.215385, 0 ), E3( -1.04308, 0.350769, 0 ), E3( -0.353846, -0.193846, 0 ), E3( -0.258462, -0.193846, 0 ), E3( -0.301538, 0.698462, 0 ), E3( -0.178462, -0.2, 0 ), E3( -0.0461538, -0.218462, 0 ), E3( 1.08923, 0.624615, 0 ), E3( 0.0646154, -0.206154, 0 ), E3( 0.28, -0.510769, 0 ), E3( 0.72, -0.0584615, 0 ), E3( 0.732308, 0.153846, 0 ), E3( 0.944615, 0.181538, 0 ), E3( 0.876923, 0.0923077, 0 ), E3( 0.990769, 0.0369231, 0 ), E3( 0.855385, -0.0184615, 0 ), E3( 0.353846, -0.547692, 0 ), E3( -0.470769, -0.609231, 0 ); boundary->SetPeriodicEnd(); TensorBlossom<1,3> *maxis = new TensorBlossom<1,3>(1, 32); E3 mpoint0 = E3( -0.403077, -0.409231, 0 ), mpoint1 = mpoint0, mpoint1a= E3( -0.363077, -0.393846, 0 ), mpoint2 = E3( -0.4, -0.24, 0 ), mpoint3 = mpoint2, mpoint4 = mpoint2, mpoint4a = mpoint1a, mpoint4b= E3( -0.227692, -0.390769, 0 ), mpoint5 = E3( -0.224615, -0.261538, 0 ), mpoint6 = mpoint5, mpoint7 = mpoint5, mpoint7a = mpoint4b, mpoint8= E3( -0.0307692, -0.396923, 0 ), mpoint8a= E3(0.0246154, -0.209231, 0 ), mpoint9 = mpoint8a, mpoint10 = mpoint8a, mpoint10a = mpoint8, mpoint11= E3( 0.276923, -0.532308, 0 ), mpoint11a= E3( 0.335385, -0.504615, 0 ), mpoint12= E3( 0.747692, -0.0676923, 0 ), mpoint12a= E3( 0.803077, 0.0430769, 0 ), mpoint13= E3( 0.796923, 0.0892308, 0 ), mpoint14 = mpoint13, mpoint15 = mpoint13, mpoint16 = mpoint12a, mpoint17 = mpoint12a, mpoint17a = mpoint12, mpoint18 = mpoint11a, mpoint18a = mpoint11, mpoint18b = mpoint8, mpoint18c = mpoint4b, mpoint18d = mpoint1a; maxis->ControlMesh() = mpoint0,mpoint1,mpoint1a,mpoint2,mpoint3,mpoint4,mpoint4a,mpoint4b, mpoint5,mpoint6,mpoint7,mpoint7a, mpoint8,mpoint8a,mpoint9,mpoint10,mpoint10a, mpoint11,mpoint11a,mpoint12,mpoint12a,mpoint13,mpoint14,mpoint15,mpoint16,mpoint17,mpoint17a,mpoint18,mpoint18a,mpoint18b,mpoint18c,mpoint18d; maxis->SetPeriodicEnd(); maxis->KnotVector() = 0.,1,1.25,2,3,4,4.33,4.67,5,6,7,7.4,8,8.15,9,10,10.4,11,11.1,12,12.75,13,14,15,16,17,17.15,18,18.1,18.5,18.7,18.9,19; TensorBlossom<2,3> *srf = new TensorBlossom<2,3>(ruled, boundary, maxis); TensorBlossom<1,3> *refined_maxis = new TensorBlossom<1,3>(1, 32); E3 ref_mpoint0 = E3( -0.480446, -0.383631, 0 ), ref_mpoint1 = ref_mpoint0, ref_mpoint1a = E3( -0.409849, -0.356736, 0 ), ref_mpoint2 = E3( -0.611556, -0.0340057, 0 ), ref_mpoint3 = ref_mpoint2, ref_mpoint4 = ref_mpoint2, ref_mpoint4a= ref_mpoint1a, ref_mpoint4b = E3( -0.224951, -0.36346, 0 ), ref_mpoint5 = E3( -0.245122, 0.0735713, 0 ), ref_mpoint6 = ref_mpoint5, ref_mpoint7 = ref_mpoint5, ref_mpoint7a= ref_mpoint4b, ref_mpoint8 = E3( -0.0165208, -0.366822, 0 ), ref_mpoint8a = E3( 0.292763, -0.000387881, 0 ), ref_mpoint9= ref_mpoint8a, ref_mpoint10=ref_mpoint8a, ref_mpoint10a= ref_mpoint8, ref_mpoint11 = E3( 0.262507, -0.434057, 0 ), ref_mpoint11a = E3( 0.339828, -0.413887, 00), ref_mpoint12 = E3( 0.723071, -0.0945177, 0 ), ref_mpoint12a = E3( 0.803753, 0.0332299, 0 ), ref_mpoint13 = E3( 0.780221, 0.0903802, 0 ), ref_mpoint14= ref_mpoint13, ref_mpoint15= ref_mpoint13, ref_mpoint16= ref_mpoint12a, ref_mpoint17= ref_mpoint12a, ref_mpoint17a= ref_mpoint12, ref_mpoint18= ref_mpoint11a, ref_mpoint18a= ref_mpoint11, ref_mpoint18b= ref_mpoint8, ref_mpoint18c= ref_mpoint4b, ref_mpoint18d= ref_mpoint1a; refined_maxis->ControlMesh() = ref_mpoint0,ref_mpoint1,ref_mpoint1a,ref_mpoint2,ref_mpoint3,ref_mpoint4,ref_mpoint4a,ref_mpoint4b, ref_mpoint5,ref_mpoint6,ref_mpoint7,ref_mpoint7a, ref_mpoint8,ref_mpoint8a,ref_mpoint9,ref_mpoint10,ref_mpoint10a,ref_mpoint11,ref_mpoint11a,ref_mpoint12,ref_mpoint12a,ref_mpoint13,ref_mpoint14, ref_mpoint15,ref_mpoint16,ref_mpoint17,ref_mpoint17a,ref_mpoint18,ref_mpoint18a,ref_mpoint18b,ref_mpoint18c,ref_mpoint18d; refined_maxis->SetPeriodicEnd(); refined_maxis->KnotVector() = 0.,1,1.25,2,3,4,4.33,4.67,5,6,7,7.4,8,8.15,9,10,10.4,11,11.1,12,12.75,13,14,15,16,17,17.15,18,18.1,18.5,18.7,18.9,19; TensorBlossom<2,3> *refined_srf = new TensorBlossom<2,3>(ruled, boundary, refined_maxis); new glModel(v, srf); new glModel(v, refined_srf); new glModel(v, boundary); new glModel(v, maxis); new glModel(v, refined_maxis); } void new_glModel(View* v) { srf_cmpl(v); } // point1 : pt( -0.470769, -0.609231, 0 ); // point2 : pt( -0.741538, -0.378462, 0 ); // point3 : pt( -0.458462, -0.215385, 0 ); // point4 : pt( -1.04308, 0.350769, 0 ); // point5 : pt( -0.353846, -0.193846, 0 ); // point6 : pt( -0.258462, -0.193846, 0 ); // point7 : pt( -0.301538, 0.698462, 0 ); // point8 : pt( -0.178462, -0.2, 0 ); // point9 : pt( -0.0461538, -0.218462, 0 ); // point10 : pt( 1.08923, 0.624615, 0 ); // point11 : pt( 0.0646154, -0.206154, 0 ); // point12 : pt( 0.28, -0.510769, 0 ); // point13 : pt( 0.72, -0.0584615, 0 ); // point14 : pt( 0.732308, 0.153846, 0 ); // point15 : pt( 0.944615, 0.181538, 0 ); // point16 : pt( 0.876923, 0.0923077, 0 ); // point17 : pt( 0.990769, 0.0369231, 0 ); // point18 : pt( 0.855385, -0.0184615, 0 ); // point19 : pt( 0.353846, -0.547692, 0 ); // curve1 : curve( 2, "ec_periodic", "kv_uniform", array( point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11, point12, point13, point14, point15, point16, point17, point18, point19 ) ); // mpoint0 : pt( -0.403077, -0.409231, 0 ); // mpoint1 : mpoint0; // mpoint1a: pt( -0.363077, -0.393846, 0 ); // mpoint2 : pt( -0.4, -0.24, 0 ); // mpoint3 : mpoint2; // mpoint4 : mpoint2; // mpoint4a: mpoint1a; // mpoint4b: pt( -0.227692, -0.390769, 0 ); // mpoint5 : pt( -0.224615, -0.261538, 0 ); // mpoint6 : mpoint5; // mpoint7 : mpoint5; // mpoint7a: mpoint4b; // mpoint8: pt( -0.0307692, -0.396923, 0 ); // mpoint8a:pt(0.0246154, -0.209231, 0 ); // mpoint9: mpoint8a; // mpoint10:mpoint8a; // mpoint10a: mpoint8; // mpoint11:pt( 0.276923, -0.532308, 0 ); // mpoint11a: pt( 0.335385, -0.504615, 0 ); // mpoint12: pt( 0.747692, -0.0676923, 0 ); // mpoint12a: pt( 0.803077, 0.0430769, 0 ); // mpoint13: pt( 0.796923, 0.0892308, 0 ); // mpoint14: mpoint13; // mpoint15: mpoint13; // mpoint16: mpoint12a; // mpoint17: mpoint12a; // mpoint17a: mpoint12; // mpoint18: mpoint11a; // mpoint18a: mpoint11; // mpoint18b: mpoint8; // mpoint18c: mpoint4b; // mpoint18d: mpoint1a; // mcurve1: curve(2,"ec_periodic", knotVector(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19), array(mpoint0,mpoint1,mpoint2,mpoint3,mpoint4,mpoint5,mpoint6,mpoint7,mpoint8,mpoint9,mpoint10,mpoint11,mpoint12,mpoint13,mpoint14,mpoint15,mpoint16,mpoint17,mpoint18)); // mcurve2: curve(2,"ec_periodic", knotVector(0,1,1.25,2,3,4,4.33,4.67,5,6,7,7.4,8,8.15,9,10,10.4,11,11.1,12,12.75,13,14,15,16,17,17.15,18,18.1,18.5,18.7,18.9,19), array(mpoint0,mpoint1,mpoint1a,mpoint2,mpoint3,mpoint4,mpoint4a,mpoint4b, mpoint5,mpoint6,mpoint7,mpoint7a, mpoint8,mpoint8a,mpoint9,mpoint10,mpoint10a,mpoint11,mpoint11a,mpoint12,mpoint12a,mpoint13,mpoint14,mpoint15,mpoint16,mpoint17,mpoint17a,mpoint18,mpoint18a,mpoint18b,mpoint18c,mpoint18d)); // ref_curve1: cRefine(curve1,cKv(mcurve2),false); // srf: ruledSrf(ref_curve1,mcurve2); // lisocrv0: crvInSrf(srf,"row",0); // show(lisocrv0); // lisocrv1: crvInSrf(srf,"row",.25); // show(lisocrv1); // lisocrv2: crvInSrf(srf,"row",.5); // show(lisocrv2); // lisocrv3: crvInSrf(srf,"row",.75); // show(lisocrv3); // lisocrv4: crvInSrf(srf,"row",1.0); // show(lisocrv4); // curve4 : curve( 4, "ec_periodic", "kv_uniform", array( point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11, point12, point13, point14, point15, point16, point17, point18, point19 ) ); // open_mcurve2: crvOpen(mcurve2); // raised_mcurve2: raiseCrvOrder(open_mcurve2,4); // open_curve4 : crvOpen(curve4); // ref_curve4: cRefine(open_curve4,cKv(raised_mcurve2),false); // surf4: ruledSrf(ref_curve4,raised_mcurve2); // badisocrv0: crvInSrf(surf4,"row",0); // show(badisocrv0); // badisocrv1: crvInSrf(surf4,"row",.25); // show(badisocrv1); // badisocrv2: crvInSrf(surf4,"row",.5); // show(badisocrv2); // badisocrv3: crvInSrf(surf4,"row",.75); // show(badisocrv3); // badisocrv4: crvInSrf(surf4,"row",1.0); // show(badisocrv4); // ref_mpoint0 : pt( -0.480446, -0.383631, 0 ); // ref_mpoint1 : ref_mpoint0; // ref_mpoint1a: pt( -0.409849, -0.356736, 0 ); // ref_mpoint2 : pt( -0.611556, -0.0340057, 0 ); // ref_mpoint3 : ref_mpoint2; // ref_mpoint4 : ref_mpoint2; // ref_mpoint4a: ref_mpoint1a; // ref_mpoint4b: pt( -0.224951, -0.36346, 0 ); // ref_mpoint5 : pt( -0.245122, 0.0735713, 0 ); // ref_mpoint6 : ref_mpoint5; // ref_mpoint7 : ref_mpoint5; // ref_mpoint7a: ref_mpoint4b; // ref_mpoint8: pt( -0.0165208, -0.366822, 0 ); // ref_mpoint8a:pt( 0.292763, -0.000387881, 0 ); // ref_mpoint9: ref_mpoint8a; // ref_mpoint10:ref_mpoint8a; // ref_mpoint10a: ref_mpoint8; // ref_mpoint11:pt( 0.262507, -0.434057, 0 ); // ref_mpoint11a: pt( 0.339828, -0.413887, 00); // ref_mpoint12: pt( 0.723071, -0.0945177, 0 ); // ref_mpoint12a: pt( 0.803753, 0.0332299, 0 ); // ref_mpoint13: pt( 0.780221, 0.0903802, 0 ); // ref_mpoint14: ref_mpoint13; // ref_mpoint15: ref_mpoint13; // ref_mpoint16: ref_mpoint12a; // ref_mpoint17: ref_mpoint12a; // ref_mpoint17a: ref_mpoint12; // ref_mpoint18: ref_mpoint11a; // ref_mpoint18a: ref_mpoint11; // ref_mpoint18b: ref_mpoint8; // ref_mpoint18c: ref_mpoint4b; // ref_mpoint18d: ref_mpoint1a; // ref_mcurve2: curve(2,"ec_periodic", knotVector(0,1,1.25,2,3,4,4.33,4.67,5,6,7,7.4,8,8.15,9,10,10.4,11,11.1,12,12.75,13,14,15,16,17,17.15,18,18.1,18.5,18.7,18.9,19), array(ref_mpoint0,ref_mpoint1,ref_mpoint1a,ref_mpoint2,ref_mpoint3,ref_mpoint4,ref_mpoint4a,ref_mpoint4b, ref_mpoint5,ref_mpoint6,ref_mpoint7,ref_mpoint7a, ref_mpoint8,ref_mpoint8a,ref_mpoint9,ref_mpoint10,ref_mpoint10a,ref_mpoint11,ref_mpoint11a,ref_mpoint12,ref_mpoint12a,ref_mpoint13,ref_mpoint14,ref_mpoint15,ref_mpoint16,ref_mpoint17,ref_mpoint17a,ref_mpoint18,ref_mpoint18a,ref_mpoint18b,ref_mpoint18c,ref_mpoint18d)); // ref_open_mcurve2: crvOpen(ref_mcurve2); // ref_raised_mcurve2: raiseCrvOrder(ref_open_mcurve2,4); // ref_surf4: ruledSrf(ref_curve4,ref_raised_mcurve2); // isocrv0: crvInSrf(ref_surf4,"row",0); // show(isocrv0); // isocrv1: crvInSrf(ref_surf4,"row",.25); // show(isocrv1); // isocrv2: crvInSrf(ref_surf4,"row",.5); // show(isocrv2); // isocrv3: crvInSrf(ref_surf4,"row",.75); // show(isocrv3); // isocrv4: crvInSrf(ref_surf4,"row",1.0); // show(isocrv4); // show(pt( -0.3785, -0.5605, 0 )); // show(pt( -0.561, -0.5323, 0 )); // show(pt( -0.6513, -0.4554, 0 )); // show(pt( -0.6492, -0.3897, 0 )); // show(pt( -0.6487, -0.3733, 0 )); // show(pt( -0.6424, -0.3576, 0 )); // show(pt( -0.6341, -0.3414, 0 )); // show(pt( -0.609, -0.2927, 0 )); // show(pt( -0.5654, -0.2394, 0 )); // show(pt( -0.6031, -0.1482, 0 )); // show(pt( -0.6533, -0.02667, 0 )); // show(pt( -0.8482, 0.1621, 0 )); // show(pt( -0.8308, 0.1656, 0 )); // show(pt( -0.8133, 0.1692, 0 )); // show(pt( -0.5836, -0.01231, 0 )); // show(pt( -0.4528, -0.1031 , 0 )); // show(pt( -0.4097, -0.133, 0 )); // show(pt( -0.3773, -0.1531, 0 )); // show(pt( -0.353, -0.1612 , 0 )); // show(pt( -0.3279, -0.1695 , 0 )); // show(pt( -0.3114, -0.1652, 0 )); // show(pt( -0.3004, -0.1459, 0 )); // show(pt( -0.2898, -0.1271 , 0 )); // show(pt( -0.2844, -0.0942, 0 )); // show(pt( -0.2815, -0.04513, 0 )); // show(pt( -0.2728, 0.1036, 0 )); // show(pt( -0.2872, 0.401, 0 )); // show(pt( -0.2738, 0.4, 0 )); // show(pt( -0.2605, 0.399, 0 )); // show(pt( -0.2195, 0.09949, 0 )); // show(pt( -0.1769, -0.05333, 0 )); // show(pt( -0.1599, -0.1145, 0 )); // show(pt( -0.1426, -0.1521, 0 )); // show(pt( -0.1145, -0.1665, 0 )); // show(pt( -0.07233, -0.1881, 0 )); // show(pt( -0.005744, -0.1573, 0 )); // show(pt( 0.121, -0.07487, 0 )); // show(pt( 0.1527, -0.05426, 0 )); // show(pt( 0.1882, -0.03041, 0 )); // show(pt( 0.2256, -0.00476, 0 )); // show(pt( 0.4377, 0.1406, 0 )); // show(pt( 0.7135, 0.3439, 0 )); // show(pt( 0.7292, 0.3456, 0 )); // show(pt( 0.7477, 0.3477, 0 )); // show(pt( 0.4062, 0.07077, 0 )); // show(pt( 0.2713, -0.1185, 0 )); // show(pt( 0.2173, -0.1942, 0 )); // show(pt( 0.1965, -0.2558, 0 )); // show(pt( 0.1978, -0.301 , 0 )); // show(pt( 0.1998, -0.3687, 0 )); // show(pt( 0.2519, -0.3994, 0 )); // show(pt( 0.3174, -0.3846, 0 )); // show(pt( 0.3284, -0.3822, 0 )); // show(pt( 0.3397, -0.3784, 0 )); // show(pt( 0.3512, -0.3736, 0 )); // show(pt( 0.4553, -0.3302, 0 )); // show(pt( 0.5809, -0.1982, 0 )); // show(pt( 0.6487, -0.09846, 0 )); // show(pt( 0.7053, -0.01538, 0 )); // show(pt( 0.7217, 0.04519, 0 )); // show(pt( 0.7422, 0.08716, 0 )); // show(pt( 0.749, 0.1012, 0 )); // show(pt( 0.7563, 0.1131, 0 )); // show(pt( 0.7656, 0.1231, 0 )); // show(pt( 0.8031, 0.1631, 0 )); // show(pt( 0.8738, 0.1723, 0 )); // show(pt( 0.8979, 0.1621 , 0 )); // show(pt( 0.9221, 0.1518, 0 )); // show(pt( 0.8995, 0.1221, 0 )); // show(pt( 0.9072, 0.09795, 0 )); // show(pt( 0.9149, 0.07385, 0 )); // show(pt( 0.9528, 0.05538, 0 )); // show(pt( 0.9492, 0.03692, 0 )); // show(pt( 0.9456, 0.01846, 0 )); // show(pt( 0.9005, 3.333e-08, 0 )); // show(pt( 0.7944, -0.09744 , 0 )); // show(pt( 0.7784, -0.1121 , 0 )); // show(pt( 0.7611, -0.1284, 0 )); // show(pt( 0.7425, -0.1461, 0 )); // show(pt( 0.6368, -0.246, 0 )); // show(pt( 0.4879, -0.3861, 0 )); // show(pt( 0.3, -0.4697, 0 )); // show(pt( 0.2779, -0.4796, 0 )); // show(pt( 0.2553, -0.4887, 0 )); // show(pt( 0.2322, -0.497, 0 )); // show(pt( 0.1401, -0.5302, 0 )); // show(pt( 0.04168, -0.5515, 0 )); // show(pt( -0.05365, -0.5626, 0 )); // show(pt( -0.1013, -0.5682, 0 )); // show(pt( -0.1482, -0.5712, 0 )); // show(pt( -0.1932, -0.572, 0 )); // show(pt( -0.2381, -0.5727, 0 )); // show(pt( -0.2812, -0.5711, 0 )); // show(pt( -0.3211, -0.5675, 0 )); // show(pt( -0.341, -0.5657, 0 )); // show(pt( -0.3602, -0.5633, 0 )); // show(pt( -0.3785, -0.5605, 0 ));
1.2.18