// By Maxim Leyenson color_file_format = jpg; double Pi=2*arccos(0); clear_screen; clear_pixmap; width=400; height=400; // clip = none; // ------------------- rotation // angle = r/100 * Pi int r1 = 30; int r2 = 20; int r3 = 5; rot_x= r1/100 * Pi; rot_y= r2/100 * Pi; rot_z= r3/100 * Pi; // -------- scaling double R = 1; // -R -- +R double sf = R/10; scale_x= sf; scale_y= sf; scale_z= sf; // ----------------- surface poly s = x^2 - y * z^2; surface = s; draw_surface; int i=0; loop: surface=rotate(s,2*Pi/100 * i,zAxis); // rotate the cubic; 1 small rotation = 2pi/100 clear_screen; draw_surface; // draw the cubic filename="whitney"+itostrn(3,i)+".jpg"; save_color_image; // save the image i=i+1; if( i < 100 ) goto loop;