home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / IRIT / IRITS.ZIP / LOOPS.IRT < prev    next >
Encoding:
Text File  |  1990-05-05  |  1.1 KB  |  63 lines

  1. #
  2. # This file existance is justified to demonstrate loops:
  3. #
  4.  
  5. #
  6. # This loop uses the beep function to generate tones in different frequency
  7. # and time. As unix systems does not support it, it is commented out. Uncomment
  8. # it for MSDOS systems only.
  9. #
  10. #for ( (b = 100), 100, 300,
  11. #    for    ( (a = 100), 100, 2000,
  12. #            (
  13. #              beep(a, b)
  14. #            )
  15. #        )
  16. #    );
  17.  
  18. save_mat = view_mat;
  19. view_mat = view_mat * scale(vector(0.7,    0.7, 0.7));
  20.  
  21. b = box(vector(-0.5, -0.2, -0.1), 1, 0.4, 0.2);
  22.  
  23. rot10x = rotx(10);
  24. rot10y = roty(10);
  25. rot10z = rotz(10);
  26.  
  27. #
  28. # Rotate around    the X axes:
  29. #
  30.  
  31. for ( (a = 1), 1, 36,
  32.         (
  33.           (view_mat = rot10x * view_mat):
  34.           view(list(b,axes), on)
  35.         )
  36.     );
  37.  
  38.  
  39. #
  40. # Rotate around    the Y axes:
  41. #
  42.  
  43. for ( (a = 1), 1, 36,
  44.         (
  45.           (view_mat = rot10y * view_mat):
  46.           view(list(b,axes), on)
  47.         )
  48.     );
  49.  
  50.  
  51. #
  52. # Rotate around    the Z axes:
  53. #
  54.  
  55. for ( (a = 1), 1, 36,
  56.         (
  57.           (view_mat = rot10z * view_mat):
  58.           view(list(b,axes), on)
  59.         )
  60.     );
  61.  
  62. view_mat = save_mat;
  63.