/* decartes curve */ delta:-1/4; poly:x^3+y^3-3*x*y -delta; surfplot(poly); /* lemniscate(1)*/ poly:(x^2*(9-x^2)-4*y^2); surfplot(poly); /* lemniscate(1)*/ poly:(x^2*(9-x^2)-4*y^2)*x*y; surfplot(poly); /* Ducky */ poly:(x^2+y^2-9)*((x-2)^2+(y-1)^2-1)*((x+2)^2+(y-1)^2-1)*(x^2/9+2*(y+1)^2-1); surfplot(poly); put(surf,0.6,rot_x); put(surf,0.6,rot_y); put(surf,0.6,rot_x); put(surf,0.6,rot_z); put(surf,0.06,scale_x); put(surf,0.06,scale_y); put(surf,0.06,scale_z); poly:x^2*y^2+x^2*z^2+y^2*z^2-x*y*z; surfplot(poly); system("echo \"transparence=50;illumination=ambient_light+diffuse_light+reflected_light+transmitted_light;\" >surf.tmpx"); system("cat surf.tmp>>surf.tmpx"); system("mv surf.tmpx surf.tmp"); system("echo \"plane=x+y+z-0.05;\">>surf.tmp"); system("echo \"curve_red=255;\">>surf.tmp"); system("echo \"curve_green=0;\">>surf.tmp"); system("echo \"curve_blue=0;\">>surf.tmp"); system("echo \"cut_with_plane;\">>surf.tmp"); system("echo \"plane=x+y+z+0.05;\">>surf.tmp"); system("echo \"curve_red=0;\">>surf.tmp"); system("echo \"curve_green=255;\">>surf.tmp"); system("echo \"curve_blue=0;\">>surf.tmp"); system("echo \"cut_with_plane;\">>surf.tmp"); system("surf -x surf.tmp>surf.log&"); /* Barth Diec */ /* set rot_x,y,z and scale_x,y,z */ put(surf,0.6,rot_x); put(surf,0.2,rot_y); put(surf,0.6,rot_z); put(surf,0.3,scale_x); put(surf,0.3,scale_y); put(surf,0.3,scale_z); /* set tau */ tau:(1+sqrt(5))/2; /* polynomial */ poly:8*(x^2-tau^4*y^2)*(y^2-tau^4*z^2)*(z^2-tau^4*x^2)* (x^4+y^4+z^4-2*(x^2*y^2+y^2*z^2+z^2*x^2))+ (3+5*tau)*(x^2+y^2+z^2-1)^2*(x^2+y^2+z^2-(2-tau))^2; surfplot(poly); /* Barth Diec */ /* set rot_x,y,z and scale_x,y,z */ put(surf,0.6,rot_x); put(surf,0.2,rot_y); put(surf,0.6,rot_z); put(surf,0.3,scale_x); put(surf,0.3,scale_y); put(surf,0.3,scale_z); /* set tau */ tau:float((1+sqrt(5))/2); /* polynomial */ poly:8*(x^2-tau^4*y^2)*(y^2-tau^4*z^2)*(z^2-tau^4*x^2)* (x^4+y^4+z^4-2*(x^2*y^2+y^2*z^2+z^2*x^2))+ (3+5*tau)*(x^2+y^2+z^2-1)^2*(x^2+y^2+z^2-(2-tau))^2; surfplot(poly);