home *** CD-ROM | disk | FTP | other *** search
- #
- # This solid uses free form surfaces to create a rolling-pin. Note that
- # A polygon loaded without its plane definition, its plane normal (point into
- # the object) is set by the cross product of its first two edges. You might
- # need to flip them (using the unary minus - overloaded above geometric
- # objects to perform exactly that) sometimes.
- #
- # Created by Gershon Elber, Mar 89
- #
-
- tm = time(true);
-
- save_mat = view_mat;
- save_res = resolution;
-
- # normal(TRUE, 0.1, YELLOW);
-
- resolution = 20;
-
- T1 = load("surface1");
- T2 = T1 * rotx(180);
- interact(list(T1, T2), false);
-
- T3 = cylin( vector(0.0, 0.0, -2.0), vector(0.0, 0.0, 4.0), 0.12);
- view(list(T3), false);
-
- S1 = T3 * T2 * T1;
- free(T1);
- free(T2);
- free(T3);
-
- final = convex(S1);
- free(S1);
-
- tm = time(false);
- tm; # In Seconds
-
- interact(list(final), false);
-
- mdump("solid5", view_mat);
- gdump("solid5", final);
-
- view_mat = save_mat;
- resolution = save_res;