home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / 3d / irit / scripts / ssi-test.irt < prev    next >
Encoding:
Text File  |  1995-02-06  |  17.9 KB  |  494 lines

  1. #
  2. # Test cases for SSI.
  3. #
  4. #                Gershon Elber, Feb 1995
  5. #
  6. # In order to be able to appreciate the complexity of some of the test cases,
  7. # it is suggested to view this file through IRIT with a display device that
  8. # is able to render the surfaces shaded, such as xgldrvs.
  9. #
  10.  
  11. #
  12. # 1. Simple close loop intersection. Both srfs are bi-quadratic polynomials.
  13. #
  14.  
  15. s1 = sbezier( list( list( ctlpt( E3, 0.1, 0.0, 1.0 ),
  16.                           ctlpt( E3, 0.3, 1.0, 0.5 ),
  17.                           ctlpt( E3, 0.0, 2.0, 1.0 ) ),
  18.                     list( ctlpt( E3, 1.1, 0.0, 0.5 ),
  19.                           ctlpt( E3, 1.3, 1.0, 0.0 ),
  20.                           ctlpt( E3, 1.0, 2.0, 0.5 ) ),
  21.                     list( ctlpt( E3, 2.1, 0.0, 1.1 ),
  22.                           ctlpt( E3, 2.3, 1.0, 0.4 ),
  23.                           ctlpt( E3, 2.0, 2.0, 1.2 ) ) ) );
  24. s2 = s1 * scale( vector( 1, 1, -1 ) ) * tz( 1.2 );
  25. color( s1, red );
  26. color( s2, green );
  27. All = list( s1, s2 );
  28. interact( All );
  29.  
  30. save( "ssi1", All );
  31.  
  32. #
  33. # 2 and 3. Same as 1 but both surfaces are degree raised. How much does it
  34. # slows down ssi computation!?
  35. #
  36.  
  37. s1a = sraise( sraise( s1, ROW, 4 ), COL, 4 );
  38. s2a = sraise( sraise( s2, ROW, 4 ), COL, 4 );
  39. color( s1a, red );
  40. color( s2a, green );
  41. All = list( s1a, s2a );
  42. interact( All );
  43.  
  44. save( "ssi2", All );
  45.  
  46. s1b = sraise( sraise( s1a, ROW, 5 ), COL, 5 );
  47. s2b = sraise( sraise( s2a, ROW, 5 ), COL, 5 );
  48. color( s1b, red );
  49. color( s2b, green );
  50. All = list( s1b, s2b );
  51. interact( All );
  52.  
  53. save( "ssi3", All );
  54.  
  55. #
  56. # 4. Two biquadratic polynomial Bspline surfaces. Intersection is open.
  57. #
  58.  
  59. s1 = sbspline( 3, 3,
  60.            list( list( ctlpt( E3, 0.1, 0.0, 1.0 ),
  61.                            ctlpt( E3, 0.3, 1.0, 0.5 ),
  62.                            ctlpt( E3, 0.0, 2.0, 1.0 ) ),
  63.                      list( ctlpt( E3, 1.1, 0.0, 0.5 ),
  64.                            ctlpt( E3, 1.3, 1.0, 0.0 ),
  65.                            ctlpt( E3, 1.0, 2.0, 0.5 ) ),
  66.                      list( ctlpt( E3, 2.1, 0.0, 1.1 ),
  67.                            ctlpt( E3, 2.3, 1.0, 0.4 ),
  68.                            ctlpt( E3, 2.0, 2.0, 1.2 ) ),
  69.                      list( ctlpt( E3, 3.1, 0.0, 1.9 ),
  70.                            ctlpt( E3, 3.3, 1.1, 1.4 ),
  71.                            ctlpt( E3, 3.0, 2.0, 1.9 ) ),
  72.                      list( ctlpt( E3, 4.1, 0.0, 1.1 ),
  73.                            ctlpt( E3, 4.3, 1.0,-0.4 ),
  74.                            ctlpt( E3, 4.0, 2.2, 1.2 ) ) ),
  75.            list( list( KV_OPEN ),
  76.              list( KV_OPEN ) ) );
  77. s2 = sbspline( 3, 3,
  78.            list( list( ctlpt( E3, 0.1, 0.0, 1.0 ),
  79.                            ctlpt( E3, 0.3, 0.7, 0.5 ),
  80.                            ctlpt( E3, 0.1, 1.2, 1.0 ),
  81.                            ctlpt( E3, 0.0, 2.0, 0.5 ) ),
  82.                      list( ctlpt( E3, 1.1, 0.0, 0.5 ),
  83.                            ctlpt( E3, 1.3, 1.0, 0.0 ),
  84.                            ctlpt( E3, 1.1, 1.3, 0.5 ),
  85.                            ctlpt( E3, 1.0, 2.0, 0.5 ) ),
  86.                      list( ctlpt( E3, 2.1, 0.0, 1.1 ),
  87.                            ctlpt( E3, 2.3, 0.5, 0.4 ),
  88.                            ctlpt( E3, 2.0, 1.0, 1.3 ),
  89.                            ctlpt( E3, 2.0, 2.0, 0.4 ) ),
  90.                      list( ctlpt( E3, 3.1, 0.0, 1.9 ),
  91.                            ctlpt( E3, 3.3, 0.7, 1.4 ),
  92.                            ctlpt( E3, 3.1, 1.1, 1.5 ),
  93.                            ctlpt( E3, 3.1, 2.0, 1.9 ) ) ),
  94.            list( list( KV_OPEN ),
  95.              list( KV_OPEN ) ) ) *
  96.     rotx( 90 ) * trans( vector( 1.5, 1.5, 0 ) );
  97. color( s1, red );
  98. color( s2, green );
  99. All = list( s1, s2 );
  100. interact( All );
  101.  
  102. save( "ssi4", All );
  103.  
  104. #
  105. # Two biquadratic rational surface intersection - a cone and a sphere.
  106. #
  107.  
  108. s1 = coneSrf( 3.0, 0.7 );
  109. s2 = sphereSrf( 0.8 ) * trans( vector( 0.35, 0.65, 1.3 ) );
  110. color( s1, red );
  111. color( s2, green );
  112. All = list( s1, s2 );
  113. interact( All );
  114.  
  115. save( "ssi5", All );
  116.  
  117. #
  118. # Same as 5, but the poles of the sphere are on the cone's surface.
  119. #
  120.  
  121. s1 = coneSrf( 3.0, 0.7 );
  122. s2 = sphereSrf( 0.8 ) * roty( -atan2( 0.7, 3.0 ) * 180 / Pi )
  123.               * trans( vector( 0.35, 0.0, 1.5 ) );
  124. color( s1, red );
  125. color( s2, green );
  126. All = list( s1, s2 );
  127. interact( All );
  128.  
  129. save( "ssi6", All );
  130.  
  131. #
  132. # Four different and isolated intersection loops between two bicubic
  133. # Bspline surfaces.
  134. #
  135.  
  136. s1 = sbspline( 4, 4,
  137.            list( list( ctlpt( E3, 0.1, 0.0, 0.51 ),
  138.                            ctlpt( E3, 0.4, 1.0, 0.52 ),
  139.                            ctlpt( E3, 0.2, 2.2, 0.5 ),
  140.                            ctlpt( E3, 0.4, 3.5, 0.49 ),
  141.                            ctlpt( E3, 0.0, 4.3, 0.52 ) ),
  142.                      list( ctlpt( E3, 1.1, 0.3, 0.53 ),
  143.                            ctlpt( E3, 1.3, 1.3, 2.7 ),
  144.                            ctlpt( E3, 1.1, 2.2,-1.4 ),
  145.                            ctlpt( E3, 1.1, 3.3, 3.1 ),
  146.                            ctlpt( E3, 1.2, 4.2, 0.48 ) ),
  147.                      list( ctlpt( E3, 2.1, 0.1, 0.47 ),
  148.                            ctlpt( E3, 2.4, 1.1, 0.52 ),
  149.                            ctlpt( E3, 2.3, 2.0, 0.51 ),
  150.                            ctlpt( E3, 2.4, 3.3, 0.52 ),
  151.                            ctlpt( E3, 2.0, 4.0, 0.53 ) ),
  152.                      list( ctlpt( E3, 3.1, 0.4, 0.49 ),
  153.                            ctlpt( E3, 3.3, 1.3, 2.6 ),
  154.                            ctlpt( E3, 2.9, 2.1,-1.9 ),
  155.                            ctlpt( E3, 2.9, 3.5, 2.0 ),
  156.                            ctlpt( E3, 3.0, 4.6, 0.51 ) ),
  157.                      list( ctlpt( E3, 4.1, 0.1, 0.53 ),
  158.                            ctlpt( E3, 4.0, 1.2, 0.45 ),
  159.                            ctlpt( E3, 4.3, 2.0, 0.51 ),
  160.                            ctlpt( E3, 3.9, 3.4, 0.55 ),
  161.                            ctlpt( E3, 4.0, 4.2, 0.51 ) ) ),
  162.            list( list( KV_OPEN ),
  163.              list( KV_OPEN ) ) );
  164. s2 = sbspline( 4, 4,
  165.            list( list( ctlpt( E3, 0.1, 0.0, 1.85 ),
  166.                            ctlpt( E3, 0.4, 1.0, 1.9 ),
  167.                            ctlpt( E3, 0.2, 2.2, 1.95 ),
  168.                            ctlpt( E3, 0.4, 3.5, 1.7 ),
  169.                            ctlpt( E3, 0.0, 4.3, 1.8 ) ),
  170.                      list( ctlpt( E3, 1.1, 0.3, 1.88 ),
  171.                            ctlpt( E3, 1.3, 1.3,-1.1 ),
  172.                            ctlpt( E3, 1.1, 2.2, 2.85 ),
  173.                            ctlpt( E3, 1.1, 3.3,-0.95 ),
  174.                            ctlpt( E3, 1.2, 4.2, 1.7 ) ),
  175.                      list( ctlpt( E3, 2.1, 0.1, 1.9 ),
  176.                            ctlpt( E3, 2.4, 1.1, 1.8 ),
  177.                            ctlpt( E3, 2.3, 2.0, 1.85 ),
  178.                            ctlpt( E3, 2.4, 3.3, 1.65 ),
  179.                            ctlpt( E3, 2.0, 4.0, 1.75 ) ),
  180.                      list( ctlpt( E3, 3.1, 0.4, 1.85 ),
  181.                            ctlpt( E3, 3.3, 1.3,-0.9 ),
  182.                            ctlpt( E3, 2.9, 2.1, 2.4 ),
  183.                            ctlpt( E3, 2.9, 3.5,-0.9 ),
  184.                            Ctlpt( E3, 3.0, 4.6, 1.8 ) ),
  185.                      list( ctlpt( E3, 4.1, 0.1, 1.85 ),
  186.                            ctlpt( E3, 4.0, 1.2, 1.75 ),
  187.                            ctlpt( E3, 4.3, 2.0, 1.65 ),
  188.                            ctlpt( E3, 3.9, 3.4, 1.95 ),
  189.                            ctlpt( E3, 4.0, 4.2, 1.85 ) ) ),
  190.            list( list( KV_OPEN ),
  191.              list( KV_OPEN ) ) );
  192. color( s1, red );
  193. color( s2, green );
  194. All = list( s1, s2 );
  195. interact( All );
  196.  
  197. save( "ssi7", All );
  198.  
  199.  
  200. #
  201. # Same as 7 but we scale the Z axis by 0.1 and by 0.01 to create almost
  202. # tangent surfaces.
  203. #
  204.  
  205. s1a = s1 * sz( 0.1 );
  206. s2a = s2 * sz( 0.1 );
  207. color( s1a, red );
  208. color( s2a, green );
  209. All = list( s1a, s2a );
  210. interact( All );
  211.  
  212. save( "ssi8", All  );
  213.  
  214. s1b = s1 * sz( 0.01 );
  215. s2b = s2 * sz( 0.01 );
  216. color( s1b, red );
  217. color( s2b, green );
  218. All = list( s1b, s2b );
  219. interact( All );
  220.  
  221. save( "ssi9", All  );
  222.  
  223. #
  224. # Two different intersection curves that are very close to each other.
  225. # Intersection between two biquadratic Bezier saddle like surfaces.
  226. # In the last example of this sequence, the surfaces are tangent at
  227. # the center point, s1( 0.5, 0.5 ) = s2( 0.5, 0.5 ) ~= (1.175, 1.13, 1.49 )
  228. #
  229.  
  230. s1 = sbezier( list( list( ctlpt( E3, 0.1, 0.0, 1.6 ),
  231.                           ctlpt( E3, 0.3, 1.1, 0.4 ),
  232.                           ctlpt( E3, 0.0, 2.2, 1.5 ) ),
  233.                     list( ctlpt( E3, 1.1, 0.2, 3.0 ),
  234.                           ctlpt( E3, 1.3, 1.0, 1.4 ),
  235.                           ctlpt( E3, 1.0, 2.2, 2.7 ) ),
  236.                     list( ctlpt( E3, 2.1, 0.1, 1.4 ),
  237.                           ctlpt( E3, 2.3, 1.3, 0.2 ),
  238.                           ctlpt( E3, 2.0, 2.2, 1.2 ) ) ) );
  239. p = seval( s1, 0.5, 0.5 );
  240.  
  241. s2a = s1 * trans( -coerce( p, vector_type ) )
  242.          * scale( vector( 1.2, 1.1, -0.5 ) )
  243.          * rotz( 15 )
  244.      * trans( vector( coord( p, 1 ), coord( p, 2 ), coord( p, 3 ) + 0.1 ) );
  245.  
  246. color( s1, red );
  247. color( s2a, green );
  248. All = list( s1, s2a );
  249. interact( All );
  250.  
  251. save( "ssi10", All );
  252.  
  253. s2b = s1 * trans( -coerce( p, vector_type ) )
  254.          * scale( vector( 1.2, 1.1, -0.5 ) )
  255.          * rotz( 15 )
  256.      * trans( vector( coord( p, 1 ), coord( p, 2 ), coord( p, 3 ) + 0.01 ) );
  257.  
  258. color( s1, red );
  259. color( s2b, green );
  260. All = list( s1, s2b );
  261. interact( All );
  262.  
  263. save( "ssi11", All );
  264.  
  265. s2c = s1 * trans( -coerce( p, vector_type ) )
  266.          * scale( vector( 1.2, 1.1, -0.5 ) )
  267.          * rotz( 15 )
  268.      * trans( vector( coord( p, 1 ), coord( p, 2 ), coord( p, 3 ) + 0.001 ) );
  269.  
  270. color( s1, red );
  271. color( s2c, green );
  272. All = list( s1, s2c );
  273. interact( All );
  274.  
  275. save( "ssi12", All );
  276.  
  277. s2d = s1 * trans( -coerce( p, vector_type ) )
  278.          * scale( vector( 1.2, 1.1, -0.5 ) )
  279.          * rotz( 15 )
  280.      * trans( vector( coord( p, 1 ), coord( p, 2 ), coord( p, 3 ) ) );
  281.  
  282. color( s1, red );
  283. color( s2d, green );
  284. All = list( s1, s2d );
  285. interact( All );
  286.  
  287. save( "ssi13", All );
  288.  
  289. #
  290. # Another case of almost tangency. Here we have a fairly flat surface and
  291. # an elliptic surface almots tangent (first case), tangent at a point (second
  292. # case) and intersects in a tiny loop (third case). Both happens at the
  293. # centers of the surfaces
  294. #     s1( 1.5, 1.0 ) ~= s2( 1.0, 1.5 ) ~= ( 2.28, 2.14, 0.48 )
  295. # Both surfaces are cubic by quadratic Bspline surfaces.
  296. #
  297.  
  298. s1 = sbspline( 3, 4,
  299.            list( list( ctlpt( E3, 0.1, 0.0, 0.3 ),
  300.                            ctlpt( E3, 0.4, 1.0, 0.1 ),
  301.                            ctlpt( E3, 0.2, 2.2, 0.5 ),
  302.                            ctlpt( E3, 0.4, 3.5, 0.1 ),
  303.                            ctlpt( E3, 0.0, 4.3, 0.2 ) ),
  304.                      list( ctlpt( E3, 1.1, 0.3, 0.15 ),
  305.                            ctlpt( E3, 1.3, 1.3, 0.3 ),
  306.                            ctlpt( E3, 1.1, 2.2, 0.2 ),
  307.                            ctlpt( E3, 1.1, 3.3, 0.25 ),
  308.                            ctlpt( E3, 1.2, 4.2, 0.0 ) ),
  309.                      list( ctlpt( E3, 2.1, 0.1, 0.4 ),
  310.                            ctlpt( E3, 2.4, 1.1, 0.7 ),
  311.                            ctlpt( E3, 2.3, 2.0, 0.35 ),
  312.                            ctlpt( E3, 2.4, 3.3, 0.22 ),
  313.                            ctlpt( E3, 2.0, 4.0, 0.35 ) ),
  314.                      list( ctlpt( E3, 3.1, 0.4, 0.11 ),
  315.                            ctlpt( E3, 3.3, 1.3, 0.1 ),
  316.                            ctlpt( E3, 2.9, 2.1, 0.2 ),
  317.                            ctlpt( E3, 2.9, 3.5, 0.3 ),
  318.                            Ctlpt( E3, 3.0, 4.6, 0.3 ) ),
  319.                      list( ctlpt( E3, 4.1, 0.1, 0.12 ),
  320.                            ctlpt( E3, 4.0, 1.2, 0.05 ),
  321.                            ctlpt( E3, 4.3, 2.0, 0.33 ),
  322.                            ctlpt( E3, 3.9, 3.4, 0.13 ),
  323.                            ctlpt( E3, 4.0, 4.2, 0.27 ) ) ),
  324.            list( list( KV_OPEN ),
  325.              list( KV_OPEN ) ) );
  326. s2 = sbspline( 4, 3,
  327.            list( list( ctlpt( E3, 0.1, 0.0, 1.85 ),
  328.                            ctlpt( E3, 0.4, 1.0, 1.9 ),
  329.                            ctlpt( E3, 0.2, 2.2, 1.95 ),
  330.                            ctlpt( E3, 0.4, 3.5, 1.7 ),
  331.                            ctlpt( E3, 0.0, 4.3, 1.8 ) ),
  332.                      list( ctlpt( E3, 1.1, 0.3, 1.88 ),
  333.                            ctlpt( E3, 1.3, 1.3, 1.6 ),
  334.                            ctlpt( E3, 1.1, 2.2, 0.7 ),
  335.                            ctlpt( E3, 1.1, 3.3, 1.5 ),
  336.                            ctlpt( E3, 1.2, 4.2, 1.7 ) ),
  337.                      list( ctlpt( E3, 2.1, 0.1, 1.9 ),
  338.                            ctlpt( E3, 2.4, 1.1, 0.5 ),
  339.                            ctlpt( E3, 2.3, 2.0, 0.1 ),
  340.                            ctlpt( E3, 2.4, 3.3, 0.5 ),
  341.                            ctlpt( E3, 2.0, 4.0, 1.75 ) ),
  342.                      list( ctlpt( E3, 3.1, 0.4, 1.85 ),
  343.                            ctlpt( E3, 3.3, 1.3, 1.3 ),
  344.                            ctlpt( E3, 2.9, 2.1, 0.5 ),
  345.                            ctlpt( E3, 2.9, 3.5, 1.4 ),
  346.                            Ctlpt( E3, 3.0, 4.6, 1.8 ) ),
  347.                      list( ctlpt( E3, 4.1, 0.1, 1.85 ),
  348.                            ctlpt( E3, 4.0, 1.2, 1.75 ),
  349.                            ctlpt( E3, 4.3, 2.0, 1.65 ),
  350.                            ctlpt( E3, 3.9, 3.4, 1.95 ),
  351.                            ctlpt( E3, 4.0, 4.2, 1.85 ) ) ),
  352.            list( list( KV_OPEN ),
  353.              list( KV_OPEN ) ) );
  354.  
  355. #
  356. # Compute a rotation matrix that rotates s2 so that its tangent plane at
  357. # (0.5, 0.5) is the same as the tangent plane of s1 at (0.5, 0.5).
  358. #
  359. nrml1 = normalize( coerce( seval( snrmlsrf( s1 ), 1.5, 1.0 ), vector_type ) );
  360. tan1a = normalize( coerce( seval( sderive( s1, ROW ), 1.5, 1.0 ),
  361.                vector_type ) );
  362. tan1b = tan1a ^ nrml1;
  363. rot1 = homomat( list(
  364.     list( coord( tan1a, 0 ), coord( tan1a, 1 ), coord( tan1a, 2 ), 0 ),
  365.     list( coord( tan1b, 0 ), coord( tan1b, 1 ), coord( tan1b, 2 ), 0 ),
  366.     list( coord( nrml1, 0 ), coord( nrml1, 1 ), coord( nrml1, 2 ), 0 ),
  367.     list( 0, 0, 0, 1 ) ) );
  368.  
  369. nrml2 = normalize( coerce( seval( snrmlsrf( s2 ), 1.0, 1.5 ), vector_type ) );
  370. tan2a = normalize( coerce( seval( sderive( s2, ROW ), 1.0, 1.5 ),
  371.                vector_type ) );
  372. tan2b = tan2a ^ nrml2;
  373. rot2 = homomat( list(
  374.     list( coord( tan2a, 0 ), coord( tan2a, 1 ), coord( tan2a, 2 ), 0 ),
  375.     list( coord( tan2b, 0 ), coord( tan2b, 1 ), coord( tan2b, 2 ), 0 ),
  376.     list( coord( nrml2, 0 ), coord( nrml2, 1 ), coord( nrml2, 2 ), 0 ),
  377.     list( 0, 0, 0, 1 ) ) );
  378.  
  379. rotmat = rot2^-1 * rot1;
  380.  
  381. #
  382. # Apply the rotation matrix.
  383. #
  384. s2r = s2 * rotmat;
  385.  
  386. #
  387. # Prove it: here are the normals of both surfaces at (0.5, 0.5).
  388. #
  389. normalize( coerce( seval( snrmlsrf( s1 ), 1.5, 1.0 ), vector_type ) );
  390. normalize( coerce( seval( snrmlsrf( s2r ), 1.0, 1.5 ), vector_type ) );
  391.  
  392. pt1 = seval( s1, 1.5, 1.0 );
  393. pt2 = seval( s2r, 1.0, 1.5 );
  394.  
  395. s2a = s2r * trans( vector( coord( pt1, 1 ) - coord( pt2, 1 ),
  396.                    coord( pt1, 2 ) - coord( pt2, 2 ),
  397.                    coord( pt1, 3 ) - coord( pt2, 3 ) + 0.01 ) );
  398. color( s1, red );
  399. color( s2a, green );
  400. All = list( s1, s2a );
  401. interact( All );
  402.  
  403. save( "ssi14", All );
  404.  
  405. s2b = s2r * trans( vector( coord( pt1, 1 ) - coord( pt2, 1 ),
  406.                    coord( pt1, 2 ) - coord( pt2, 2 ),
  407.                    coord( pt1, 3 ) - coord( pt2, 3 ) ) );
  408. color( s1, red );
  409. color( s2b, green );
  410. All = list( s1, s2b );
  411. interact( All );
  412.  
  413. save( "ssi15", All );
  414.  
  415. s2c = s2r * trans( vector( coord( pt1, 1 ) - coord( pt2, 1 ),
  416.                    coord( pt1, 2 ) - coord( pt2, 2 ),
  417.                    coord( pt1, 3 ) - coord( pt2, 3 ) - 0.01 ) );
  418. color( s1, red );
  419. color( s2c, green );
  420. All = list( s1, s2c );
  421. interact( All );
  422.  
  423. save( "ssi16", All );
  424.  
  425. #
  426. # A complex but single intersection curve. This is between two quadratic
  427. # Bspline surfaces.
  428.  
  429. s1 = sbspline( 3, 3,
  430.            list( list( ctlpt( E3, 0.1, 0.0, 0.51 ),
  431.                            ctlpt( E3, 0.4, 1.0, 0.52 ),
  432.                            ctlpt( E3, 0.2, 2.2, 0.5 ),
  433.                            ctlpt( E3, 0.4, 3.5, 0.49 ),
  434.                            ctlpt( E3, 0.0, 4.3, 0.52 ) ),
  435.                      list( ctlpt( E3, 1.1, 0.3, 0.53 ),
  436.                            ctlpt( E3, 1.3, 1.3, 1.7 ),
  437.                            ctlpt( E3, 1.1, 2.2,-0.4 ),
  438.                            ctlpt( E3, 1.1, 3.3, 1.1 ),
  439.                            ctlpt( E3, 1.2, 4.2, 0.48 ) ),
  440.                      list( ctlpt( E3, 2.1, 0.1, 0.47 ),
  441.                            ctlpt( E3, 2.4, 1.1, 1.52 ),
  442.                            ctlpt( E3, 2.3, 2.0, 0.51 ),
  443.                            ctlpt( E3, 2.4, 3.3, 1.52 ),
  444.                            ctlpt( E3, 2.0, 4.0, 0.53 ) ),
  445.                      list( ctlpt( E3, 3.1, 0.4, 0.49 ),
  446.                            ctlpt( E3, 3.3, 1.3, 1.6 ),
  447.                            ctlpt( E3, 2.9, 2.1,-0.9 ),
  448.                            ctlpt( E3, 2.9, 3.5, 1.0 ),
  449.                            ctlpt( E3, 3.0, 4.6, 0.51 ) ),
  450.                      list( ctlpt( E3, 4.1, 0.1, 0.53 ),
  451.                            ctlpt( E3, 4.0, 1.2, 0.45 ),
  452.                            ctlpt( E3, 4.3, 2.0, 0.51 ),
  453.                            ctlpt( E3, 3.9, 3.4, 0.55 ),
  454.                            ctlpt( E3, 4.0, 4.2, 0.51 ) ) ),
  455.            list( list( KV_OPEN ),
  456.              list( KV_OPEN ) ) );
  457.  
  458. s2 = sbspline( 3, 3,
  459.            list( list( ctlpt( E3, 0.1, 0.0, 1.45 ),
  460.                            ctlpt( E3, 0.4, 1.0, 1.5 ),
  461.                            ctlpt( E3, 0.2, 2.2, 1.55 ),
  462.                            ctlpt( E3, 0.4, 3.5, 1.3 ),
  463.                            ctlpt( E3, 0.0, 4.3, 1.4 ) ),
  464.                      list( ctlpt( E3, 1.1, 0.3, 1.48 ),
  465.                            ctlpt( E3, 1.3, 1.3,-0.5 ),
  466.                            ctlpt( E3, 1.1, 2.2, 1.45 ),
  467.                            ctlpt( E3, 1.1, 3.3,-0.5 ),
  468.                            ctlpt( E3, 1.2, 4.2, 1.3 ) ),
  469.                      list( ctlpt( E3, 2.1, 0.1, 2.5 ),
  470.                            ctlpt( E3, 2.4, 1.1, 2.4 ),
  471.                            ctlpt( E3, 2.3, 2.0, 0.1 ),
  472.                            ctlpt( E3, 2.4, 3.3, 2.4 ),
  473.                            ctlpt( E3, 2.0, 4.0, 2.25 ) ),
  474.                      list( ctlpt( E3, 3.1, 0.4, 1.45 ),
  475.                            ctlpt( E3, 3.3, 1.3,-0.5 ),
  476.                            ctlpt( E3, 2.9, 2.1, 1.0 ),
  477.                            ctlpt( E3, 2.9, 3.5,-0.3 ),
  478.                            Ctlpt( E3, 3.0, 4.6, 1.4 ) ),
  479.                      list( ctlpt( E3, 4.1, 0.1, 1.45 ),
  480.                            ctlpt( E3, 4.0, 1.2, 1.35 ),
  481.                            ctlpt( E3, 4.3, 2.0, 1.25 ),
  482.                            ctlpt( E3, 3.9, 3.4, 1.55 ),
  483.                            ctlpt( E3, 4.0, 4.2, 1.45 ) ) ),
  484.            list( list( KV_OPEN ),
  485.              list( KV_OPEN ) ) ) * tz( -0.26 );
  486. color( s1, red );
  487. color( s2, green );
  488. All = list( s1, s2 );
  489.  
  490. interact( All );
  491.  
  492. save( "ssi17", All );
  493.