triangle_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 triangle_ex1.cpp.

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

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


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