triangle_ex2.cpp
Go to the documentation of this file.00001 #include <SyFi.h>
00002 #include <fstream>
00003
00004 using namespace GiNaC;
00005 using namespace SyFi;
00006 using namespace std;
00007
00008 int main() {
00009
00010 initSyFi(3);
00011
00012 symbol x0("x0"), x1("x1"), y0("y0"), y1("y1"), z0("z0");
00013
00014 ex p0 = lst(x0,y0,z0);
00015 ex p1 = lst(x1,y0,z0);
00016 ex p2 = lst(x0,y1,z0);
00017
00018 Triangle triangle(p0,p1,p2);
00019
00020 ex repr = triangle.repr();
00021 cout <<"t.repr "<<repr<<endl;
00022
00023 ex f = x*y*z;
00024 ex intf = triangle.integrate(f);
00025 cout <<"intf "<<intf<<endl;
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 return 0;
00044 }
00045