home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
i
/
iritsm3s.zip
/
irit
/
solid2.irt
< prev
next >
Wrap
Text File
|
1991-09-04
|
2KB
|
78 lines
#
# This solid was taken from: Geometric Modeling,
# by Michael E. Mortenson page 441, figure 10.9
#
# Created by Gershon Elber, Jan 89
#
tm = time(true);
save_mat = view_mat;
view_mat = view_mat * scale(vector( 0.5, 0.5, 0.5 ));
save_res = resolution;
# normal(TRUE, 0.1, RED);
T1 = BOX(vector( -2.0, -0.35, 0.0), 4, 0.7, 0.4);
resolution = 40;
T2 = CYLIN(vector( 0.0, 0.0, -0.001), vector( 0.0, 0.0, 0.402), 1.4);
S1 = T1 * T2;
free(T1);
free(T2);
beep(800,200);
view(list(S1), true);
resolution = 20;
T3 = CYLIN(vector( 0.0, 0.0, -0.001), vector( 0.0, 0.0, 0.402), 0.9);
S2 = S1 + T3;
free(T3);
free(S1);
beep(800,200);
view(list(S2), true);
resolution = 40;
T4 = CYLIN(vector( 1.45, -0.5, 1.0), vector( 0.0, 1.0, 0.0), 0.8);
T5 = CYLIN(vector(-1.45, -0.5, 1.0), vector( 0.0, 1.0, 0.0), 0.8);
S3 = S2 - T4 - T5;
free(T4);
free(T5);
free(S2);
beep(800,200);
view(list(S3), true);
resolution = 8;
T6 = CYLIN(vector( 1.2, 0.0, -0.1), vector( 0.0, 0.0, 0.5), 0.1);
T7 = CYLIN(vector(-1.2, 0.0, -0.1), vector( 0.0, 0.0, 0.5), 0.1);
S4 = S3 - T6 - T7;
free(T6);
free(T7);
beep(1200,200);
view(list(S4), true);
resolution = 16;
T8 = CYLIN(vector( 0.0, 0.0, -0.2), vector( 0.0, 0.0, 0.9), 0.3);
T9 = BOX(vector( -0.6, -0.15,-0.1), 1.2, 0.3, 0.7);
S5 = T8 + T9;
free(T8);
free(T9);
beep(1200,200);
view(list(S5), false);
S6 = S4 - S5;
free(S4);
free(S5);
final = convex(S6);
free(S6);
tm = time(false);
tm; # In Seconds
interact(list(final), false);
save("solid2", list(view_mat,final));
free(final);
view_mat = save_mat;
resolution = save_res;