triangle_ex1.cpp

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

Generated on Tue Nov 22 11:10:22 2005 for SyFi by  doxygen 1.4.4