home *** CD-ROM | disk | FTP | other *** search
- {
- super_el.cal: Create a superelipsoid
-
- igensurf -v -s 15 -t 15 -S 100 -e "x_exp=0.1;y_exp=0.1"
- super_el.cal | writetddd >super_el.obj
-
- x_scale, y_scale and z_scale is the scale factors for the x, y and
- z axis, they're set to 1.0 below, but can of course be modified.
-
- x_exp and y_exp controls the roundedness of the surface.
- if they equals 1, you get a sphere. If they're less than 1, the surface
- becomes more box like. If they're greater than 2, the surface becomes
- concave. Set them from the command line with the -e option.
-
-
- Try these values:
- x_exp = 0.1, y_exp = 0.1 (a die)
- x_exp = 1.0, y_exp = 1.0 (a sphere)
- x_exp = 0.1, y_exp = 1.0 (a barrel)
- x_exp = 0.1, y_exp = 2.9 (I don't know what this one is called!)
- x_exp = 2.9, y_exp = 2.9 (ditto)
- x_exp = 2.9, y_exp = 1.0 A top
- }
-
- { x_exp : 2.9; } { Set these with the -e option instead. }
- { y_exp : 2.9; }
-
- step_s : 15;
- step_t : 15;
-
- x_scale : 1.0; { Scale factor for the x axis }
- y_scale : 1.0; { Scale factor for the y axis }
- z_scale : 1.0; { Scale factor for the z axis }
-
- x(u,v) = x_scale * gy(u) * hx(v); { This is a spherical product }
- y(u,v) = y_scale * gx(u);
- z(u,v) = z_scale * gy(u) * hy(v);
-
- gx(u) = Pow(cos(PI*u), x_exp);
- gy(u) = Pow(sin(PI*u), x_exp);
-
- hx(v) = Pow(cos(2*PI*v), y_exp);
- hy(v) = Pow(sin(2*PI*v), y_exp);
-
- { Be sure that pow can handle negative numbers: }
- Pow(x,y) = if (x, x ^ y, -((-x) ^ y) );
-
- #scale 100
- #phong on
-