00001 #include <SyFi.h>
00002
00003 int main() {
00004
00005
00006 ex p0 = lst(0.0,0.0,0.0);
00007 ex p1 = lst(1.0,1.0,1.0);
00008
00009 Line line(p0,p1);
00010
00011
00012 symbol t("t");
00013 ex l_repr = line.repr(t);
00014 cout <<"l.repr "<<l_repr<<endl;
00015 EQUAL_OR_DIE(l_repr, "{x==t,y==t,z==t,{t,0,1}}");
00016
00017 for (int i=0; i< l_repr.nops(); i++) {
00018 cout <<"l_repr.op(" <<i<<"): "<<l_repr.op(i)<<endl;
00019 }
00020
00021
00022 ex f = x*x + y*y*y + z;
00023 ex intf = line.integrate(f);
00024 cout <<"intf "<<intf<<endl;
00025 EQUAL_OR_DIE(intf, "13/12*sqrt(3)");
00026
00027
00028
00029 return 0;
00030
00031 }
00032