home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / 3d / irit / scripts / adap_iso.irt next >
Encoding:
Text File  |  1993-12-30  |  2.8 KB  |  80 lines

  1. #
  2. # Simple examples for the use of adaptive isocurves.
  3. #
  4. #                    Gershon Elber May 1993.
  5. #
  6. srf1 = sbezier( list( list( ctlpt( E3, -0.5, -1.0,  0.0 ),
  7.                     ctlpt( E3,  0.4,  0.0,  0.1 ),
  8.                     ctlpt( E3, -0.5,  1.0,  0.0 ) ),
  9.                   list( ctlpt( E3,  0.0, -0.7,  0.1 ),
  10.                     ctlpt( E3,  0.0,  0.0,  0.0 ),
  11.                     ctlpt( E3,  0.0,  0.7, -0.2 ) ),
  12.                   list( ctlpt( E3,  0.5, -1.0,  0.1 ),
  13.                     ctlpt( E3, -0.4,  0.0,  0.0 ),
  14.                     ctlpt( E3,  0.5,  1.0, -0.2 ) ) ) );
  15. color( srf1, magenta );
  16.  
  17. aiso = adapiso( srf1, COL, 0.1, true, false );
  18. color( aiso, yellow );
  19. interact( list( axes, srf1, aiso ) );
  20. aiso = adapiso( srf1, COL, 0.1, false, false );
  21. color( aiso, yellow );
  22. interact( list( axes, srf1, aiso ) );
  23. color( srf1, magenta );
  24. aiso = adapiso( srf1, ROW, 0.05, true, false );
  25. color( aiso, yellow );
  26. interact( list( axes, srf1, aiso ) );
  27. aiso = adapiso( srf1, ROW, 0.05, false, false );
  28. color( aiso, yellow );
  29. interact( list( axes, srf1, aiso ) );
  30.  
  31. srf2 = sbspline( 3, 3,
  32.          list( list( ctlpt( E3, 1.0, 0.0, 0.0 ),
  33.                      ctlpt( E3, 1.0, 1.0, 2.0 ),
  34.                      ctlpt( E3, 1.0, 2.0, 0.0 ) ),
  35.                    list( ctlpt( E3, 2.0, 0.9, 2.0 ),
  36.                      ctlpt( E3, 2.0, 1.0, 0.0 ),
  37.                      ctlpt( E3, 2.0, 1.1, 2.0 ) ),
  38.                    list( ctlpt( E3, 3.0, 0.0, 0.0 ),
  39.                      ctlpt( E3, 3.0, 1.0, 2.0 ),
  40.                      ctlpt( E3, 3.0, 2.0, 0.0 ) ),
  41.                    list( ctlpt( E3, 4.0, 0.9, 1.0 ),
  42.                      ctlpt( E3, 4.0, 1.0, 0.0 ),
  43.                      ctlpt( E3, 4.0, 1.1, 1.0 ) ) ),
  44.          list( list( KV_OPEN ),
  45.                list( KV_OPEN ) ) ) *
  46.     scale( vector( 0.5, 0.5, 0.5 ) ) * trans( vector( -0.5, 0.0, 0.0 ) );
  47. color( srf2, magenta );
  48.  
  49. aiso = adapiso( srf2, COL, 0.05, true, false );
  50. color( aiso, yellow );
  51. interact( list( axes, srf2, aiso ) );
  52. aiso = adapiso( srf2, COL, 0.05, false, false );
  53. color( aiso, yellow );
  54. interact( list( axes, srf2, aiso ) );
  55.  
  56. srf3 = sbspline( 3, 3,
  57.          list( list( ctlpt( E3, 1.0, 0.0, 0.0 ),
  58.                      ctlpt( E3, 1.0, 1.0, 0.0 ),
  59.                      ctlpt( E3, 1.0, 2.0, 0.0 ) ),
  60.                    list( ctlpt( E3, 2.0, 0.9, 0.0 ),
  61.                      ctlpt( E3, 2.0, 1.0, 0.0 ),
  62.                      ctlpt( E3, 2.0, 1.1, 0.0 ) ),
  63.                    list( ctlpt( E3, 3.0, 0.0, 0.0 ),
  64.                      ctlpt( E3, 3.0, 1.0, 0.0 ),
  65.                      ctlpt( E3, 3.0, 2.0, 0.0 ) ),
  66.                    list( ctlpt( E3, 4.0, 0.9, 0.0 ),
  67.                      ctlpt( E3, 4.0, 1.0, 0.0 ),
  68.                      ctlpt( E3, 4.0, 1.1, 0.0 ) ) ),
  69.          list( list( KV_OPEN ),
  70.                list( KV_OPEN ) ) ) *
  71.     scale( vector( 0.5, 0.5, 0.5 ) ) * trans( vector( -0.5, 0.0, 0.0 ) );
  72. color( srf3, magenta );
  73.  
  74. aiso = adapiso( srf3, COL, 0.05, true, false );
  75. color( aiso, yellow );
  76. interact( list( axes, srf3, aiso ) );
  77. aiso = adapiso( srf3, COL, 0.05, false, false );
  78. color( aiso, yellow );
  79. interact( list( axes, srf3, aiso ) );
  80.