SyFi
0.3
|
00001 #include <SyFi.h> 00002 #include <fstream> 00003 00004 using namespace GiNaC; 00005 using namespace SyFi; 00006 using namespace std; 00007 00008 int main() { 00009 00010 /* 00011 initSyFi(3); 00012 00013 ex p0 = lst(0.0,0.0,0.0); 00014 ex p1 = lst(1.0,0.0,0.0); 00015 ex p2 = lst(0.0,1.0,0.0); 00016 ex p3 = lst(0.0,0.0,1.0); 00017 00018 Simplex simplex(lst(p0,p1,p2,p3)); 00019 00020 ex coord = barycenter(simplex); 00021 cout <<"coord "<<coord<<endl; 00022 */ 00023 00024 initSyFi(4); 00025 00026 ex q0 = lst(0.0,0.0,0.0,0.0); 00027 ex q1 = lst(1.0,0.0,0.0,0.0); 00028 ex q2 = lst(0.0,1.0,0.0,0.0); 00029 ex q3 = lst(0.0,0.0,1.0,0.0); 00030 ex q4 = lst(0.0,0.0,0.0,1.0); 00031 00032 Simplex simplex4(lst(q0,q1,q2,q3,q4)); 00033 00034 ex coord4 = barycenter(simplex4); 00035 cout <<"coord "<<coord4<<endl; 00036 00037 } 00038 00039 00040