00001 #include <SyFi.h>
00002
00003 int main() {
00004
00005 ex p0 = lst(0.0,0.0,0.0);
00006 ex p1 = lst(1.0,0.0,0.0);
00007 ex p2 = lst(0.0,1.0,0.0);
00008 ex p3 = lst(0.0,0.0,1.0);
00009
00010 Tetrahedron tetrahedron(p0,p1,p2,p3);
00011
00012 ex repr = tetrahedron.repr();
00013 cout <<"t.repr "<<repr<<endl;
00014 EQUAL_OR_DIE(repr, "{x==r,y==s,z==t,{r,0,1},{s,0,1-r},{t,0,1-s-r}}");
00015
00016 ex f = x*y*z;
00017 ex intf = tetrahedron.integrate(f);
00018 cout <<"intf "<<intf<<endl;
00019 EQUAL_OR_DIE(intf, "1/720");
00020
00021 return 0;
00022 }
00023