tetrahedron_ex1.cpp File Reference

#include <SyFi.h>

Go to the source code of this file.

Functions

int main ()


Function Documentation

int main  ) 
 

Definition at line 3 of file tetrahedron_ex1.cpp.

References EQUAL_OR_DIE(), Tetrahedron::integrate(), Tetrahedron::repr(), x, y, and z.

00003            {
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 }


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