home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
graphic
/
irit
/
solid3h.irt
< prev
next >
Wrap
Text File
|
1991-11-29
|
1KB
|
58 lines
#
# Yet another mechanical part (?)
# This one is probably not for the IBM PC version (too big...).
#
tm = time(true);
save_mat = view_mat;
save_res = resolution;
# normal(on, 0.02, YELLOW);
resolution = 32;
B1 = box(vector( -0.5, -0.2, 0.0), 1.0, 0.4, 0.15);
B2 = box(vector(-0.25, -0.3, 0.1), 0.5, 0.6, 0.5);
M1 = B1 - B2;
free(B1);
free(B2);
beep(600,200);
interact(list(M1), false);
C1 = sphere(vector( 0.0, 0.0, 0.2), 0.181);
view(list(C1), false);
M2 = M1 - C1;
free(M1);
free(C1);
beep(600,200);
view(list(M2), true);
C2 = circle(vector( 0.55, 0.0, 0.0), 0.12);
C2 = extrude(C2, vector(-0.2, 0.0, 0.2));
C2 = C2 * circpoly(vector( 0.0, 0.0, 1.0), vector( 0.55, 0.0, 0.05), 0.25);
C3 = circle(vector(-0.55, 0.0, 0.0), 0.12);
C3 = extrude(C3, vector( 0.2, 0.0, 0.2));
C3 = C3 * circpoly(vector( 0.0, 0.0, 1.0), vector( -0.55, 0.0, 0.05), 0.25);
view(list(C2, C3), false);
M3 = M2 - C2 - C3;
free(M2);
free(C2);
free(C3);
final = convex(M3);
free(M3);
tm = time(false);
tm; # In Seconds
beep(1200,200);
interact(list(final), false);
save("solid3h", list(view_mat,final));
free(final);
resolution = save_res;
view_mat = save_mat;