line_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"), z1("z1");
00013
00014 ex p0 = lst(x0,y0,z0);
00015 ex p1 = lst(x1,y1,z1);
00016
00017 Line line(p0,p1);
00018
00019 symbol t("t");
00020 ex l_repr = line.repr(t);
00021 cout <<"l.repr "<<l_repr<<endl;
00022
00023
00024 for (int i=0; i< l_repr.nops(); i++) {
00025 cout <<"l_repr.op(" <<i<<"): "<<l_repr.op(i)<<endl;
00026 }
00027
00028 ex f = x*x + y*y*y + z;
00029 ex intf = line.integrate(f);
00030 cout <<"intf "<<intf<<endl;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 return 0;
00048 }
00049