home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
graphic
/
irit
/
primitiv.irt
< prev
next >
Wrap
Text File
|
1991-03-21
|
2KB
|
67 lines
#
# Display of all primitives of the system:
# BOX, GBOX, CONE, CYLIN, SPHERE, TORUS
#
# Created by Gershon Elber, Dec. 88
#
save_mat = view_mat;
save_res = resolution;
view_mat = view_mat * scale(vector( 0.5, 0.5, 0.5 ));
axes15 = axes * scale(vector(1.5, 1.5, 1.5));
b=box(vector(-0.5, -0.5, -0.5), 1.0, 1.0, 1.0);
view(list(axes15, b), true); free(b);
g=gbox(vector(-0.25, -0.25, -0.25), vector( 1.1, 0.1, 0.2),
vector( 0.4, 0.9, 0.2), vector( 0.3, 0.05, 1.4));
view(list(g), false); free(g);
pause(1.0);
view(list(axes15), true);
c=cone(vector(-0.5, 0.0, 0.0), vector(-0.5, 0.0, 0.0), 0.5);
view(list(c), false);
c=cone(vector( 0.5, 0.0, 0.0), vector( 0.5, 0.0, 0.0), 0.5);
view(list(c), false);
c=cone(vector( 0.0,-0.5, 0.0), vector( 0.0,-0.5, 0.0), 0.5);
view(list(c), false);
c=cone(vector( 0.0, 0.5, 0.0), vector( 0.0, 0.5, 0.0), 0.5);
view(list(c), false);
c=cone(vector( 0.0, 0.0,-0.5), vector( 0.0, 0.0,-0.5), 0.5);
view(list(c), false);
c=cone(vector( 0.0, 0.0, 0.5), vector( 0.0, 0.0, 0.5), 0.5);
view(list(c), false); free(c);
pause(1.0);
view(list(axes15), true);
c=cylin(vector(-0.8, 0.0, 0.0), vector(-0.5, 0.3, 0.3), 0.3);
view(list(c), false);
c=cylin(vector( 0.8, 0.0, 0.0), vector( 0.8, 0.0, 0.0), 0.3);
view(list(c), false);
c=cylin(vector( 0.0,-0.8, 0.0), vector( 0.1,-0.5, 0.2), 0.3);
view(list(c), false);
c=cylin(vector( 0.0, 0.8, 0.0), vector( 0.0, 0.8, 0.0), 0.3);
view(list(c), false);
c=cylin(vector( 0.0, 0.0,-0.8), vector( 0.4, 0.2,-0.5), 0.3);
view(list(c), false);
c=cylin(vector( 0.0, 0.0, 0.8), vector( 0.0, 0.0, 0.8), 0.3);
view(list(c), false); free(c);
pause(1.0);
resolution = 12;
s=sphere(vector( 0.0, 0.0, 0.0), 0.5);
view(list(axes15, s), true); free(s);
pause(1.0);
t=torus(vector( 0.0, 0.0, 0.0), vector( 0.1, 0.2, 1.0), 0.5, 0.2);
view(list(axes15, t), true); free(t);
free(axes15);
resolution = save_res;
view_mat = save_mat;