home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / demos / gpc / tests / ambient.v16 < prev    next >
Encoding:
Text File  |  1991-02-13  |  18.5 KB  |  473 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          :    ambient.v16
  25. | Date          :    Thu Sep 27 16:05:52 MDT 1990    
  26. | Project       :    Picture Level Benchmark
  27. | Description    :    See ambient.doc
  28. | Status    :    Version 1.00
  29. | Revisions     :    Rev 1.0 by HP/DAC    
  30. |
  31. \*--------------------------------------------------------------------*/
  32. %
  33.  
  34.     Configuration rgb double_buffer true_color  ; 
  35.     Read_geometry_file "ambient.d15";
  36.     Specify_report_file "ambient.r16";
  37.     Default_view_specification  1  500 perspective;
  38.     Active_view  1  ; 
  39.  
  40. % *********************************************************************** % 
  41. % Set up static attributes                                                %
  42. % *********************************************************************** % 
  43.     HLHS_Removal hlhs_disable ;
  44.     Text_prec Stroke ;
  45.     Char_exp  1 ;
  46.     Text_color  1  1  1 ;
  47.     char_height  30 ;
  48.     Background_color    0.300000  0.300000  0.800000 ;
  49.     Interior_style solid ;
  50.     Interior_color  1.000000  1.000000  1.000000 ;
  51.     Backface_interior_color  1.000000  1.000000  1.000000 ;
  52.     Interior_lighting  2 ;
  53.     Edge_flag enable ;
  54.     Edge_type  0 ;
  55.     Edge_color  1.000000  0.800000  0.600000 ;
  56.     Surface_approximation_criteria 1 1.000000 1.000000;
  57.  
  58. % ****************************************************************** %
  59. % Set up matrix for position geometry on the screen                  %
  60. % ****************************************************************** %
  61.     Identity3  0  ; 
  62.     Apply_to_global3  0  ; 
  63.  
  64.     Translate3  0  -375   375  0 Replace  ;     % Set Initial position  %
  65.     Push_matrix3  ;                 % Push Initial position %
  66.  
  67.     Translate3  1   250     0  0 Replace  ;     % Set Column offset     %
  68.     Translate3  2     0  -250  0 Replace  ;     % Set Row offset        %
  69.  
  70. % Create a ramped light table %
  71.     Define_light
  72.       % Index in light source table  %  1
  73.       % Light source color components %  1.000000    1.000000    1.000000
  74.       % Non-directional light source  % Ambient_light
  75.      ; 
  76.     Define_light
  77.       % Index in light source table  %  2
  78.       % Light source color components %  1.000000    0.660000   0.660000
  79.       % Non-directional light source  % Ambient_light
  80.      ; 
  81.     Define_light
  82.       % Index in light source table  %  3
  83.       % Light source color components %  1.000000    0.330000   0.330000
  84.       % Non-directional light source  % Ambient_light
  85.      ; 
  86.     Define_light
  87.       % Index in light source table  %  4
  88.       % Light source color components %  1.000000    0.000000    0.000000
  89.       % Non-directional light source  % Ambient_light
  90.      ; 
  91.  
  92.  
  93. % *********************************************************************** % 
  94. %                                                                         % 
  95. %                                                                         % 
  96. %                           Begin Test Loop                               % 
  97. %                                                                         % 
  98. % *********************************************************************** % 
  99. Begin_test  1  ; 
  100.     Text3  -450  -450  0 "Ambient Test: NURB true perspective";
  101.     Text3  -450  -495  0 "ambient.v16";
  102.  
  103. % *********************************************************************** % 
  104. %                           Row 1 Column 1                                %
  105. % *********************************************************************** %
  106.   Interior_shading  1; 
  107.   Surface_properties
  108.     % Ambient reflection coefficient     %  0.000000
  109.     % Diffuse reflection coefficient    %  0.000000
  110.     % Specular reflection coefficient    %  0.000000
  111.     % Specularity true-color components %  0.000000  0.000000  0.000000
  112.     % Specular exponent                 %  0.000000
  113.     % Transparency coefficient          %  1.000000
  114.    ; 
  115.   Backface_properties
  116.     % Ambient reflection coefficient     %  1.000000
  117.     % Diffuse reflection coefficient    %  0.000000
  118.     % Specular reflection coefficient    %  0.000000
  119.     % Specularity true-color components %  0.000000  0.000000  0.000000
  120.     % Specular exponent                 %  0.000000
  121.     % Transparency coefficient          %  1.000000
  122.    ; 
  123.   Backface_processing
  124.     % Backfacing polygons are identified % 1
  125.     % No backface culling                % 0; 
  126.   Light_state
  127.     activate_list
  128.     {  1    }
  129.     deactivate_list
  130.     {  2    }
  131.    ;
  132.   Apply_to_global3  0  ; 
  133.   Execute_structure 20  ; 
  134.   
  135.  
  136. % *********************************************************************** % 
  137. %                           Row 1 Column 2                                %
  138. % *********************************************************************** %
  139.   Interior_shading  2; 
  140.   Surface_properties
  141.     % Ambient reflection coefficient     %  0.250000
  142.     % Diffuse reflection coefficient    %  0.000000
  143.     % Specular reflection coefficient    %  0.000000
  144.     % Specularity true-color components %  0.000000  0.000000  0.000000
  145.     % Specular exponent                 %  0.000000
  146.     % Transparency coefficient          %  1.000000
  147.    ; 
  148.   Backface_properties
  149.     % Ambient reflection coefficient     %  0.750000
  150.     % Diffuse reflection coefficient    %  0.000000
  151.     % Specular reflection coefficient    %  0.000000
  152.     % Specularity true-color components %  0.000000  0.000000  0.000000
  153.     % Specular exponent                 %  0.000000
  154.     % Transparency coefficient          %  1.000000
  155.    ; 
  156.   Backface_processing
  157.     % Backfacing polygons are identified % 1
  158.     % No backface culling                % 0; 
  159.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  160.   Apply_to_global3  0  ; 
  161.   Call_structure 20  ; 
  162.   
  163.  
  164. % *********************************************************************** % 
  165. %                           Row 1 Column 3                                %
  166. % *********************************************************************** %
  167.   Interior_shading  3; 
  168.   Surface_properties
  169.     % Ambient reflection coefficient     %  0.750000
  170.     % Diffuse reflection coefficient    %  0.000000
  171.     % Specular reflection coefficient    %  0.000000
  172.     % Specularity true-color components %  0.000000  0.000000  0.000000
  173.     % Specular exponent                 %  0.000000
  174.     % Transparency coefficient          %  1.000000
  175.    ; 
  176.   Backface_properties
  177.     % Ambient reflection coefficient     %  0.250000
  178.     % Diffuse reflection coefficient    %  0.000000
  179.     % Specular reflection coefficient    %  0.000000
  180.     % Specularity true-color components %  0.000000  0.000000  0.000000
  181.     % Specular exponent                 %  0.000000
  182.     % Transparency coefficient          %  1.000000
  183.    ; 
  184.   Backface_processing
  185.     % Backfacing polygons are identified % 1
  186.     % No backface culling                % 0; 
  187.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  188.   Apply_to_global3  0  ; 
  189.   Execute_structure 20  ; 
  190.   
  191.  
  192. % *********************************************************************** % 
  193. %                           Row 1 Column 4                                %
  194. % *********************************************************************** %
  195.   Interior_shading  4; 
  196.   Surface_properties
  197.     % Ambient reflection coefficient     %  1.000000
  198.     % Diffuse reflection coefficient    %  0.000000
  199.     % Specular reflection coefficient    %  0.000000
  200.     % Specularity true-color components %  0.000000  0.000000  0.000000
  201.     % Specular exponent                 %  0.000000
  202.     % Transparency coefficient          %  1.000000
  203.    ; 
  204.   Backface_properties
  205.     % Ambient reflection coefficient     %  0.000000
  206.     % Diffuse reflection coefficient    %  0.000000
  207.     % Specular reflection coefficient    %  0.000000
  208.     % Specularity true-color components %  0.000000  0.000000  0.000000
  209.     % Specular exponent                 %  0.000000
  210.     % Transparency coefficient          %  1.000000
  211.    ; 
  212.   Backface_processing
  213.     % Backfacing polygons are identified % 1
  214.     % No backface culling                % 0; 
  215.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  216.   Apply_to_global3  0  ; 
  217.   Call_structure 20  ; 
  218.   
  219.  
  220. % *********************************************************************** % 
  221. %                           Row 2 Column 1                                %
  222. % *********************************************************************** %
  223.   Interior_shading  1; 
  224.   Surface_properties
  225.     % Ambient reflection coefficient     %  0.000000
  226.     % Diffuse reflection coefficient    %  0.000000
  227.     % Specular reflection coefficient    %  0.000000
  228.     % Specularity true-color components %  0.000000  0.000000  0.000000
  229.     % Specular exponent                 %  0.000000
  230.     % Transparency coefficient          %  1.000000
  231.    ; 
  232.   Backface_properties
  233.     % Ambient reflection coefficient     %  1.000000
  234.     % Diffuse reflection coefficient    %  0.000000
  235.     % Specular reflection coefficient    %  0.000000
  236.     % Specularity true-color components %  0.000000  0.000000  0.000000
  237.     % Specular exponent                 %  0.000000
  238.     % Transparency coefficient          %  1.000000
  239.    ; 
  240.   Backface_processing
  241.     % Backfacing polygons not identified % 0
  242.     % Backfacing  poly culled  (ignored) % 1; 
  243.   Pop_matrix3  ; 
  244.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  245.   Push_matrix3  ; 
  246.   Apply_to_global3  0  ; 
  247.   Execute_structure 20  ; 
  248.   
  249.  
  250. % *********************************************************************** % 
  251. %                           Row 2 Column 2                                %
  252. % *********************************************************************** %
  253.   Interior_shading  2; 
  254.   Surface_properties
  255.     % Ambient reflection coefficient     %  0.250000
  256.     % Diffuse reflection coefficient    %  0.000000
  257.     % Specular reflection coefficient    %  0.000000
  258.     % Specularity true-color components %  0.000000  0.000000  0.000000
  259.     % Specular exponent                 %  0.000000
  260.     % Transparency coefficient          %  1.000000
  261.    ; 
  262.   Backface_properties
  263.     % Ambient reflection coefficient     %  0.750000
  264.     % Diffuse reflection coefficient    %  0.000000
  265.     % Specular reflection coefficient    %  0.000000
  266.     % Specularity true-color components %  0.000000  0.000000  0.000000
  267.     % Specular exponent                 %  0.000000
  268.     % Transparency coefficient          %  1.000000
  269.    ; 
  270.   Backface_processing
  271.     % Backfacing polygons not identified % 0
  272.     % Frontfacing poly culled  (ignored) % 2; 
  273.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  274.   Apply_to_global3  0  ; 
  275.   Call_structure 20  ; 
  276.   
  277.  
  278. % *********************************************************************** % 
  279. %                           Row 2 Column 3                                %
  280. % *********************************************************************** %
  281.   Interior_shading  3; 
  282.   Surface_properties
  283.     % Ambient reflection coefficient     %  0.750000
  284.     % Diffuse reflection coefficient    %  0.000000
  285.     % Specular reflection coefficient    %  0.000000
  286.     % Specularity true-color components %  0.000000  0.000000  0.000000
  287.     % Specular exponent                 %  0.000000
  288.     % Transparency coefficient          %  1.000000
  289.    ; 
  290.   Backface_properties
  291.     % Ambient reflection coefficient     %  0.250000
  292.     % Diffuse reflection coefficient    %  0.000000
  293.     % Specular reflection coefficient    %  0.000000
  294.     % Specularity true-color components %  0.000000  0.000000  0.000000
  295.     % Specular exponent                 %  0.000000
  296.     % Transparency coefficient          %  1.000000
  297.    ; 
  298.   Backface_processing
  299.     % Backfacing polygons not identified % 0
  300.     % No backface culling                % 0; 
  301.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  302.   Apply_to_global3  0  ; 
  303.   Execute_structure 20  ; 
  304.   
  305.  
  306. % *********************************************************************** % 
  307. %                           Row 2 Column 4                                %
  308. % *********************************************************************** %
  309.   Interior_shading  4; 
  310.   Surface_properties
  311.     % Ambient reflection coefficient     %  1.000000
  312.     % Diffuse reflection coefficient    %  0.000000
  313.     % Specular reflection coefficient    %  0.000000
  314.     % Specularity true-color components %  0.000000  0.000000  0.000000
  315.     % Specular exponent                 %  0.000000
  316.     % Transparency coefficient          %  1.000000
  317.    ; 
  318.   Backface_properties
  319.     % Ambient reflection coefficient     %  0.000000
  320.     % Diffuse reflection coefficient    %  0.000000
  321.     % Specular reflection coefficient    %  0.000000
  322.     % Specularity true-color components %  0.000000  0.000000  0.000000
  323.     % Specular exponent                 %  0.000000
  324.     % Transparency coefficient          %  1.000000
  325.    ; 
  326.   Backface_processing
  327.     % Backfacing polygons not identified % 0
  328.     % Backfacing  poly culled  (ignored) % 1; 
  329.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  330.   Apply_to_global3  0  ; 
  331.   Call_structure 20  ; 
  332.   
  333.  
  334. % *********************************************************************** % 
  335. %                           Row 3 Column 1                                %
  336. % *********************************************************************** %
  337.   Interior_shading  1; 
  338.   Surface_properties
  339.     % Ambient reflection coefficient     %  1.000000
  340.     % Diffuse reflection coefficient    %  0.000000
  341.     % Specular reflection coefficient    %  0.000000
  342.     % Specularity true-color components %  0.000000  0.000000  0.000000
  343.     % Specular exponent                 %  0.000000
  344.     % Transparency coefficient          %  1.000000
  345.    ; 
  346.   Backface_properties
  347.     % Ambient reflection coefficient     %  0.500000
  348.     % Diffuse reflection coefficient    %  0.000000
  349.     % Specular reflection coefficient    %  0.000000
  350.     % Specularity true-color components %  0.000000  0.000000  0.000000
  351.     % Specular exponent                 %  0.000000
  352.     % Transparency coefficient          %  1.000000
  353.    ; 
  354.   Backface_processing
  355.     % Backfacing polygons are identified % 1
  356.     % No backface culling                % 0; 
  357.   Light_state
  358.     activate_list
  359.     {  4    }
  360.     deactivate_list
  361.     {  1    }
  362.    ;
  363.   Pop_matrix3  ; 
  364.   Concat_matrix3  2  0 postconcat  ;         % Move down one row %
  365.   Push_matrix3  ; 
  366.   Apply_to_global3  0  ; 
  367.   Execute_structure 20  ; 
  368.   
  369.  
  370. % *********************************************************************** % 
  371. %                           Row 3 Column 2                                %
  372. % *********************************************************************** %
  373.   Interior_shading  2; 
  374.   Surface_properties
  375.     % Ambient reflection coefficient     %  1.000000
  376.     % Diffuse reflection coefficient    %  0.000000
  377.     % Specular reflection coefficient    %  0.000000
  378.     % Specularity true-color components %  0.000000  0.000000  0.000000
  379.     % Specular exponent                 %  0.000000
  380.     % Transparency coefficient          %  1.000000
  381.    ; 
  382.   Backface_properties
  383.     % Ambient reflection coefficient     %  0.500000
  384.     % Diffuse reflection coefficient    %  0.000000
  385.     % Specular reflection coefficient    %  0.000000
  386.     % Specularity true-color components %  0.000000  0.000000  0.000000
  387.     % Specular exponent                 %  0.000000
  388.     % Transparency coefficient          %  1.000000
  389.    ; 
  390.   Backface_processing
  391.     % Backfacing polygons are identified % 1
  392.     % No backface culling                % 0; 
  393.   Light_state
  394.     activate_list
  395.     {  3    }
  396.     deactivate_list
  397.     {  4    }
  398.    ;
  399.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  400.   Apply_to_global3  0  ; 
  401.   Call_structure 20  ; 
  402.   
  403.  
  404. % *********************************************************************** % 
  405. %                           Row 3 Column 3                                %
  406. % *********************************************************************** %
  407.   Interior_shading  3; 
  408.   Surface_properties
  409.     % Ambient reflection coefficient     %  1.000000
  410.     % Diffuse reflection coefficient    %  0.000000
  411.     % Specular reflection coefficient    %  0.000000
  412.     % Specularity true-color components %  0.000000  0.000000  0.000000
  413.     % Specular exponent                 %  0.000000
  414.     % Transparency coefficient          %  1.000000
  415.    ; 
  416.   Backface_properties
  417.     % Ambient reflection coefficient     %  0.500000
  418.     % Diffuse reflection coefficient    %  0.000000
  419.     % Specular reflection coefficient    %  0.000000
  420.     % Specularity true-color components %  0.000000  0.000000  0.000000
  421.     % Specular exponent                 %  0.000000
  422.     % Transparency coefficient          %  1.000000
  423.    ; 
  424.   Backface_processing
  425.     % Backfacing polygons are identified % 1
  426.     % No backface culling                % 0; 
  427.   Light_state
  428.     activate_list
  429.     {  2    }
  430.     deactivate_list
  431.     {  3    }
  432.    ;
  433.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  434.   Apply_to_global3  0  ; 
  435.   Execute_structure 20  ; 
  436.   
  437.  
  438. % *********************************************************************** % 
  439. %                           Row 3 Column 4                                %
  440. % *********************************************************************** %
  441.   Interior_shading  4; 
  442.   Surface_properties
  443.     % Ambient reflection coefficient     %  1.000000
  444.     % Diffuse reflection coefficient    %  0.000000
  445.     % Specular reflection coefficient    %  0.000000
  446.     % Specularity true-color components %  0.000000  0.000000  0.000000
  447.     % Specular exponent                 %  0.000000
  448.     % Transparency coefficient          %  1.000000
  449.    ; 
  450.   Backface_properties
  451.     % Ambient reflection coefficient     %  0.500000
  452.     % Diffuse reflection coefficient    %  0.000000
  453.     % Specular reflection coefficient    %  0.000000
  454.     % Specularity true-color components %  0.000000  0.000000  0.000000
  455.     % Specular exponent                 %  0.000000
  456.     % Transparency coefficient          %  1.000000
  457.    ; 
  458.   Backface_processing
  459.     % Backfacing polygons are identified % 1
  460.     % No backface culling                % 0; 
  461.   Light_state
  462.     activate_list
  463.     {  1    }
  464.     deactivate_list
  465.     {  2    }
  466.    ;
  467.   Concat_matrix3  1  0 postconcat  ;         % Move over one column %
  468.   Apply_to_global3  0  ; 
  469.   Call_structure 20  ; 
  470.   
  471. End_test  ; 
  472. Sleep 5 ;
  473.