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

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

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


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