home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / graphic / irit / coplanar.irt < prev    next >
Encoding:
Text File  |  1992-07-19  |  1.0 KB  |  57 lines

  1. #
  2. # Simple demo of handling coplanar Booleans.
  3. #
  4. #                        Gershon Elber,  July 1992.
  5. #
  6.  
  7. coplanar=1; # Try it with coplanar = 0 to see the difference.
  8.  
  9. a = cylin(vector( 0.0, 0.0, 0.0 ), vector( 0.0, 0.0, 1.0 ), 1.0);
  10. b = cylin(vector( 0.5, 0.0, 0.0 ), vector( 0.0, 0.0, 1.0 ), 1.0);
  11.  
  12. interact(list(a,b), 0 );
  13.  
  14. c = a+b;
  15. interact(list(c), 0 );
  16.  
  17. c = a*b;
  18. interact(list(c), 0 );
  19.  
  20. c = a-b;
  21. interact(list(c), 0 );
  22.  
  23. c = b-a;
  24. interact(list(c), 0 );
  25.  
  26. a = cylin(vector( 0.0, 0.0, 0.0 ), vector( 0.0, 0.0, 1.0 ), 1.0);
  27. b = a * scale(vector( 2.0, 0.5, 1.0 ));
  28. interact(list(a,b), 0 );
  29.  
  30. c = a+b;
  31. interact(list(c), 0 );
  32.  
  33. c = a*b;
  34. interact(list(c), 0 );
  35.  
  36. c = a-b;
  37. interact(list(c), 0 );
  38.  
  39. c = b-a;
  40. interact(list(c), 0 );
  41.  
  42. a = box(vector( -2.0,  -2.0, 0.0 ), 4.0, 4.0, 1.0 );
  43. b = cylin(vector( 0.0, 0.0, 0.0 ), vector( 0.0, 0.0, 2.0 ), 1.0 );
  44. interact(list(a,b), 0 );
  45.  
  46. c = a+b;
  47. interact(list(c), 0 );
  48.  
  49. c = a*b;
  50. interact(list(c), 0 );
  51.  
  52. c = a-b;
  53. interact(list(c), 0 );
  54.  
  55. c = b-a;
  56. interact(list(c), 0 );
  57.