home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
graphic
/
irit
/
loops.irt
< prev
next >
Wrap
Text File
|
1991-12-15
|
1KB
|
66 lines
#
# This file existance is justified to demonstrate loops:
#
#
# This loop uses the beep function to generate tones in different frequency
# and time. Unix systems does not support it.
#
if ( machine, "=", msdos,
for ( (b = 100), 100, 300,
for ( (a = 100), 100, 2000,
(
beep(a, b)
)
)
)
);
save_mat = view_mat;
view_mat = view_mat * scale(vector(0.7, 0.7, 0.7));
b = box(vector(-0.5, -0.2, -0.1), 1, 0.4, 0.2);
rot10x = rotx(10);
rot10y = roty(10);
rot10z = rotz(10);
#
# Rotate around the X axes:
#
for ( (a = 1), 1, 36,
(
(view_mat = rot10x * view_mat):
view(list(b,axes), on)
)
);
#
# Rotate around the Y axes:
#
for ( (a = 1), 1, 36,
(
(view_mat = rot10y * view_mat):
view(list(b,axes), on)
)
);
#
# Rotate around the Z axes:
#
for ( (a = 1), 1, 36,
(
(view_mat = rot10z * view_mat):
view(list(b,axes), on)
)
);
view_mat = save_mat;
free(rot10x); free(rot10y); free(rot10z);