home *** CD-ROM | disk | FTP | other *** search
- #
- # This file existance is justified to demonstrate loops:
- #
-
- #
- # This loop uses the beep function to generate tones in different frequency
- # and time. As unix systems does not support it, it is commented out. Uncomment
- # it for MSDOS systems only.
- #
- #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;
-