home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / demos / gpc / tests / backface.v08 < prev    next >
Encoding:
Text File  |  1991-02-13  |  18.3 KB  |  553 lines

  1. %
  2. /*--------------------------------------------------------------------*\
  3. |
  4. |   Copyright (c)1989,1990,1991 National Computer Graphics Association
  5. |
  6. |       Permission is granted to any individual or instititution 
  7. |  to use, copy, or redistribute this software so long as it is not
  8. |    sold for profit, provided this copyright notice is retained.
  9. |
  10. |                         Developed for the
  11. |               National Computer Graphics Association
  12. |                        2722 Merrilee Drive
  13. |                         Fairfax, VA  22031
  14. |                           (703) 698-9600
  15. |
  16. |                                 by
  17. |                SimGraphics Engineering Corporation
  18. |                   1137 Huntington Drive, Suite A
  19. |                      South Pasadena, CA  91030
  20. |                           (213) 255-0900
  21. |---------------------------------------------------------------------
  22. |
  23. | Author    :    SimGraphics Engineering Corporation
  24. | File          :    backface.v08
  25. | Date          :    Tue Jul 10 16:43:18 PDT 1990
  26. | Project       :    Picture Level Benchmark
  27. | Description    :    See backface.doc
  28. | Status    :    Version 1.02
  29. | Revisions     :    1.01: Apply_to_global3 removed from data file 
  30. |            and moved to inside test loop.  This eased
  31. |            problems for PHIGS ports.
  32. |
  33. |            1.02:
  34. |            Files backface.d02 backface.d03 backface.d04
  35. |            have been replaced with file backface.d01
  36. |
  37. |            Files backface.d06 backface.d07 backface.d08
  38. |            have been replaced with file backface.d05
  39. |
  40. |            Files backface.d10 backface.d11 backface.d12
  41. |            have been replaced with file backface.d09
  42. |
  43. |            Files backface.d14 backface.d15 backface.d16
  44. |            have been replaced with file backface.d13
  45. |
  46. |            Files backface.d18 backface.d19 backface.d20
  47. |            have been replaced with file backface.d17
  48. |
  49. |            Files backface.d22 backface.d23 backface.d24
  50. |            have been replaced with file backface.d21
  51. |
  52. |            Files backface.d26 backface.d27 backface.d28
  53. |            have been replaced with file backface.d2r5
  54. |
  55. \*--------------------------------------------------------------------*/
  56. %
  57.  
  58.     Configuration rgb double_buffer pseudo_color;
  59.     Read_geometry_file "backface.d05";
  60.     Specify_report_file "backface.r08";
  61.     Default_view_specification  1  500 perspective;
  62.     Active_view  1  ; 
  63.  
  64. % *********************************************************************** % 
  65. % Set up static attributes                                                %
  66. % *********************************************************************** % 
  67.     Text_prec Stroke ;
  68.     Char_exp  1 ;
  69.     char_height  30 ;
  70.     Interior_style solid ;
  71.     Edge_flag enable ;
  72.     Edge_type  0 ;
  73.     Edge_width  1 ;
  74.     Interior_shading  1 ;
  75.     Interior_lighting  1 ;
  76.  
  77.  
  78.     Define_color
  79.          8     1     0     0    %    Red        %
  80.          9     0     1     0    %    Greeen        %
  81.          10     0     0     1    %    Blue        %
  82.          11     1     1     0    %    Yellow        %
  83.          12     0     1     1    %    Cyan        %
  84.          13     1     0     1    %    Majenta        %
  85.          14     1     1     1    %    White        %
  86.          15     0     0     0    %    Black        %
  87.          16     0.300000     0.300000     0.800000
  88.      17     1     0.800000     0.600000 
  89.  
  90.      20   0.000000  0.000000  1.000000  21   0.250000  0.000000  0.750000
  91.      22   0.500000  0.000000  0.500000  23   0.750000  0.000000  0.250000
  92.      24   1.000000  0.000000  0.000000
  93.  
  94.      25   1.000000  1.000000  0.000000  26   0.750000  1.000000  0.250000
  95.      27   0.500000  1.000000  0.500000  28   0.250000  1.000000  0.750000
  96.      29   0.000000  1.000000  1.000000
  97.     ;
  98.     Text_color_index  14;
  99.     Background_color_index  16 ;
  100.     Edge_color_index  17 ;
  101.  
  102.     Identity3  0  ; 
  103.     Identity3  1  ; 
  104.     Apply_to_global3  1  ; 
  105.     Identity3  2  ; 
  106.     % Set Initial position  %
  107.     Translate3  0  -416.660004   416.660004  0 Postconcat  ; 
  108.     % Set Column offset     %
  109.     Translate3  1   166.660004     0     0 Postconcat  ; 
  110.     % Set Row offset        %
  111.     Translate3  2     0     -166.660004  0 Postconcat  ; 
  112.     % Push Initial position %
  113.     Push_matrix3  ;                 
  114.  
  115. % *********************************************************************** % 
  116. %                                                                         % 
  117. %                                                                         % 
  118. %                           Begin Test Loop                               % 
  119. %                                                                         % 
  120. % *********************************************************************** % 
  121. Begin_test  1  ; 
  122.     Text3  -450  -450  0 "Backface Test: POLY3 pseudo perspective";
  123.     Text3  -450  -495  0 "backface.v08";
  124.  
  125. % *********************************************************************** % 
  126. %                           Row 1 Column 1                                %
  127. % *********************************************************************** %
  128.   HLHS_Removal hlhs_disable;
  129.  
  130.   Interior_color_index  20;
  131.   Backface_interior_color_index  25;
  132.   Backface_processing  0   0;
  133.  
  134.   Apply_to_global3  0  ; 
  135.   Execute_structure 20  ; 
  136.   
  137.  
  138. % *********************************************************************** % 
  139. %                           Row 1 Column 2                                %
  140. % *********************************************************************** %
  141.   HLHS_Removal hlhs_enable;
  142.  
  143.   Interior_color_index  20;
  144.   Backface_interior_color_index  25;
  145.   Backface_processing  0   1;
  146.  
  147.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  148.   Apply_to_global3  0  ; 
  149.   Call_structure 20  ; 
  150.   
  151.  
  152. % *********************************************************************** % 
  153. %                           Row 1 Column 3                                %
  154. % *********************************************************************** %
  155.   HLHS_Removal hlhs_disable;
  156.  
  157.   Interior_color_index  20;
  158.   Backface_interior_color_index  25;
  159.   Backface_processing  0   2;
  160.  
  161.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  162.   Apply_to_global3  0  ; 
  163.   Execute_structure 20  ; 
  164.   
  165.  
  166. % *********************************************************************** % 
  167. %                           Row 1 Column 4                                %
  168. % *********************************************************************** %
  169.   HLHS_Removal hlhs_enable;
  170.  
  171.   Interior_color_index  20;
  172.   Backface_interior_color_index  25;
  173.   Backface_processing  1   0;
  174.  
  175.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  176.   Apply_to_global3  0  ; 
  177.   Call_structure 20  ; 
  178.   
  179.  
  180. % *********************************************************************** % 
  181. %                           Row 1 Column 5                                %
  182. % *********************************************************************** %
  183.   HLHS_Removal hlhs_disable;
  184.  
  185.   Interior_color_index  20;
  186.   Backface_interior_color_index  25;
  187.   Backface_processing  1   1;
  188.  
  189.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  190.   Apply_to_global3  0  ; 
  191.   Execute_structure 20  ; 
  192.   
  193.  
  194. % *********************************************************************** % 
  195. %                           Row 1 Column 6                                %
  196. % *********************************************************************** %
  197.   HLHS_Removal hlhs_enable;
  198.  
  199.   Interior_color_index  20;
  200.   Backface_interior_color_index  25;
  201.   Backface_processing  1   2;
  202.  
  203.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  204.   Apply_to_global3  0  ; 
  205.   Call_structure 20  ; 
  206.   
  207.  
  208. % *********************************************************************** % 
  209. %                           Row 2 Column 1                                %
  210. % *********************************************************************** %
  211.   HLHS_Removal hlhs_disable;
  212.  
  213.   Interior_color_index  21;
  214.   Backface_interior_color_index  26;
  215.   Backface_processing  0   0;
  216.  
  217.   Pop_matrix3  ; 
  218.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  219.   Push_matrix3  ; 
  220.   Apply_to_global3  0  ; 
  221.   Execute_structure 20  ; 
  222.   
  223.  
  224. % *********************************************************************** % 
  225. %                           Row 2 Column 2                                %
  226. % *********************************************************************** %
  227.   HLHS_Removal hlhs_enable;
  228.  
  229.   Interior_color_index  21;
  230.   Backface_interior_color_index  26;
  231.   Backface_processing  0   1;
  232.  
  233.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  234.   Apply_to_global3  0  ; 
  235.   Call_structure 20  ; 
  236.   
  237.  
  238. % *********************************************************************** % 
  239. %                           Row 2 Column 3                                %
  240. % *********************************************************************** %
  241.   HLHS_Removal hlhs_disable;
  242.  
  243.   Interior_color_index  21;
  244.   Backface_interior_color_index  26;
  245.   Backface_processing  0   2;
  246.  
  247.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  248.   Apply_to_global3  0  ; 
  249.   Execute_structure 20  ; 
  250.   
  251.  
  252. % *********************************************************************** % 
  253. %                           Row 2 Column 4                                %
  254. % *********************************************************************** %
  255.   HLHS_Removal hlhs_enable;
  256.  
  257.   Interior_color_index  21;
  258.   Backface_interior_color_index  26;
  259.   Backface_processing  1   0;
  260.  
  261.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  262.   Apply_to_global3  0  ; 
  263.   Call_structure 20  ; 
  264.   
  265.  
  266. % *********************************************************************** % 
  267. %                           Row 2 Column 5                                %
  268. % *********************************************************************** %
  269.   HLHS_Removal hlhs_disable;
  270.  
  271.   Interior_color_index  21;
  272.   Backface_interior_color_index  26;
  273.   Backface_processing  1   1;
  274.  
  275.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  276.   Apply_to_global3  0  ; 
  277.   Execute_structure 20  ; 
  278.   
  279.  
  280. % *********************************************************************** % 
  281. %                           Row 2 Column 6                                %
  282. % *********************************************************************** %
  283.   HLHS_Removal hlhs_enable;
  284.  
  285.   Interior_color_index  21;
  286.   Backface_interior_color_index  26;
  287.   Backface_processing  1   2;
  288.  
  289.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  290.   Apply_to_global3  0  ; 
  291.   Call_structure 20  ; 
  292.   
  293.  
  294. % *********************************************************************** % 
  295. %                           Row 3 Column 1                                %
  296. % *********************************************************************** %
  297.   HLHS_Removal hlhs_disable;
  298.  
  299.   Interior_color_index  22;
  300.   Backface_interior_color_index  27;
  301.   Backface_processing  0   0;
  302.  
  303.   Pop_matrix3  ; 
  304.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  305.   Push_matrix3  ; 
  306.   Apply_to_global3  0  ; 
  307.   Execute_structure 20  ; 
  308.   
  309.  
  310. % *********************************************************************** % 
  311. %                           Row 3 Column 2                                %
  312. % *********************************************************************** %
  313.   HLHS_Removal hlhs_enable;
  314.  
  315.   Interior_color_index  22;
  316.   Backface_interior_color_index  27;
  317.   Backface_processing  0   1;
  318.  
  319.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  320.   Apply_to_global3  0  ; 
  321.   Call_structure 20  ; 
  322.   
  323.  
  324. % *********************************************************************** % 
  325. %                           Row 3 Column 3                                %
  326. % *********************************************************************** %
  327.   HLHS_Removal hlhs_disable;
  328.  
  329.   Interior_color_index  22;
  330.   Backface_interior_color_index  27;
  331.   Backface_processing  0   2;
  332.  
  333.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  334.   Apply_to_global3  0  ; 
  335.   Execute_structure 20  ; 
  336.   
  337.  
  338. % *********************************************************************** % 
  339. %                           Row 3 Column 4                                %
  340. % *********************************************************************** %
  341.   HLHS_Removal hlhs_enable;
  342.  
  343.   Interior_color_index  22;
  344.   Backface_interior_color_index  27;
  345.   Backface_processing  1   0;
  346.  
  347.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  348.   Apply_to_global3  0  ; 
  349.   Call_structure 20  ; 
  350.   
  351.  
  352. % *********************************************************************** % 
  353. %                           Row 3 Column 5                                %
  354. % *********************************************************************** %
  355.   HLHS_Removal hlhs_disable;
  356.  
  357.   Interior_color_index  22;
  358.   Backface_interior_color_index  27;
  359.   Backface_processing  1   1;
  360.  
  361.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  362.   Apply_to_global3  0  ; 
  363.   Execute_structure 20  ; 
  364.   
  365.  
  366. % *********************************************************************** % 
  367. %                           Row 3 Column 6                                %
  368. % *********************************************************************** %
  369.   HLHS_Removal hlhs_enable;
  370.  
  371.   Interior_color_index  22;
  372.   Backface_interior_color_index  27;
  373.   Backface_processing  1   2;
  374.  
  375.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  376.   Apply_to_global3  0  ; 
  377.   Call_structure 20  ; 
  378.   
  379.  
  380. % *********************************************************************** % 
  381. %                           Row 4 Column 1                                %
  382. % *********************************************************************** %
  383.   HLHS_Removal hlhs_disable;
  384.  
  385.   Interior_color_index  23;
  386.   Backface_interior_color_index  28;
  387.   Backface_processing  0   0;
  388.  
  389.   Pop_matrix3  ; 
  390.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  391.   Push_matrix3  ; 
  392.   Apply_to_global3  0  ; 
  393.   Execute_structure 20  ; 
  394.   
  395.  
  396. % *********************************************************************** % 
  397. %                           Row 4 Column 2                                %
  398. % *********************************************************************** %
  399.   HLHS_Removal hlhs_enable;
  400.  
  401.   Interior_color_index  23;
  402.   Backface_interior_color_index  28;
  403.   Backface_processing  0   1;
  404.  
  405.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  406.   Apply_to_global3  0  ; 
  407.   Call_structure 20  ; 
  408.   
  409.  
  410. % *********************************************************************** % 
  411. %                           Row 4 Column 3                                %
  412. % *********************************************************************** %
  413.   HLHS_Removal hlhs_disable;
  414.  
  415.   Interior_color_index  23;
  416.   Backface_interior_color_index  28;
  417.   Backface_processing  0   2;
  418.  
  419.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  420.   Apply_to_global3  0  ; 
  421.   Execute_structure 20  ; 
  422.   
  423.  
  424. % *********************************************************************** % 
  425. %                           Row 4 Column 4                                %
  426. % *********************************************************************** %
  427.   HLHS_Removal hlhs_enable;
  428.  
  429.   Interior_color_index  23;
  430.   Backface_interior_color_index  28;
  431.   Backface_processing  1   0;
  432.  
  433.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  434.   Apply_to_global3  0  ; 
  435.   Call_structure 20  ; 
  436.   
  437.  
  438. % *********************************************************************** % 
  439. %                           Row 4 Column 5                                %
  440. % *********************************************************************** %
  441.   HLHS_Removal hlhs_disable;
  442.  
  443.   Interior_color_index  23;
  444.   Backface_interior_color_index  28;
  445.   Backface_processing  1   1;
  446.  
  447.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  448.   Apply_to_global3  0  ; 
  449.   Execute_structure 20  ; 
  450.   
  451.  
  452. % *********************************************************************** % 
  453. %                           Row 4 Column 6                                %
  454. % *********************************************************************** %
  455.   HLHS_Removal hlhs_enable;
  456.  
  457.   Interior_color_index  23;
  458.   Backface_interior_color_index  28;
  459.   Backface_processing  1   2;
  460.  
  461.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  462.   Apply_to_global3  0  ; 
  463.   Call_structure 20  ; 
  464.   
  465.  
  466. % *********************************************************************** % 
  467. %                           Row 5 Column 1                                %
  468. % *********************************************************************** %
  469.   HLHS_Removal hlhs_disable;
  470.  
  471.   Interior_color_index  24;
  472.   Backface_interior_color_index  29;
  473.   Backface_processing  0   0;
  474.  
  475.   Pop_matrix3  ; 
  476.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  477.   Push_matrix3  ; 
  478.   Apply_to_global3  0  ; 
  479.   Execute_structure 20  ; 
  480.   
  481.  
  482. % *********************************************************************** % 
  483. %                           Row 5 Column 2                                %
  484. % *********************************************************************** %
  485.   HLHS_Removal hlhs_enable;
  486.  
  487.   Interior_color_index  24;
  488.   Backface_interior_color_index  29;
  489.   Backface_processing  0   1;
  490.  
  491.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  492.   Apply_to_global3  0  ; 
  493.   Call_structure 20  ; 
  494.   
  495.  
  496. % *********************************************************************** % 
  497. %                           Row 5 Column 3                                %
  498. % *********************************************************************** %
  499.   HLHS_Removal hlhs_disable;
  500.  
  501.   Interior_color_index  24;
  502.   Backface_interior_color_index  29;
  503.   Backface_processing  0   2;
  504.  
  505.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  506.   Apply_to_global3  0  ; 
  507.   Execute_structure 20  ; 
  508.   
  509.  
  510. % *********************************************************************** % 
  511. %                           Row 5 Column 4                                %
  512. % *********************************************************************** %
  513.   HLHS_Removal hlhs_enable;
  514.  
  515.   Interior_color_index  24;
  516.   Backface_interior_color_index  29;
  517.   Backface_processing  1   0;
  518.  
  519.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  520.   Apply_to_global3  0  ; 
  521.   Call_structure 20  ; 
  522.   
  523.  
  524. % *********************************************************************** % 
  525. %                           Row 5 Column 5                                %
  526. % *********************************************************************** %
  527.   HLHS_Removal hlhs_disable;
  528.  
  529.   Interior_color_index  24;
  530.   Backface_interior_color_index  29;
  531.   Backface_processing  1   1;
  532.  
  533.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  534.   Apply_to_global3  0  ; 
  535.   Execute_structure 20  ; 
  536.   
  537.  
  538. % *********************************************************************** % 
  539. %                           Row 5 Column 6                                %
  540. % *********************************************************************** %
  541.   HLHS_Removal hlhs_enable;
  542.  
  543.   Interior_color_index  24;
  544.   Backface_interior_color_index  29;
  545.   Backface_processing  1   2;
  546.  
  547.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  548.   Apply_to_global3  0  ; 
  549.   Call_structure 20  ; 
  550.   
  551. End_test  ; 
  552. Sleep 5 ;
  553.