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 5 of file tetrahedron_ex1.cpp.

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

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


Generated on Mon Jan 9 18:08:08 2006 for SyFi by  doxygen 1.4.4