home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / ARRAYS / ARRAY3.POV < prev   
Text File  |  1999-10-30  |  1KB  |  51 lines

  1. // Persistence of Vision Ray Tracer POV-Ray 3.1 Sample Scene
  2. // by Chris Young
  3. // ARRAY3.POV demonstrates basic use of the float functions
  4. // dimensions(ARRAY_ID) and dimension_size(ARRAY_ID,INT).
  5.  
  6. #include "colors.inc"
  7.  
  8. light_source { <100,1000,-1000>, White}
  9.  
  10. camera { location <1,1.2,-13> direction 2*z look_at <0,1,0>}
  11.  
  12. union { 
  13.  plane{y,-2} plane{-z,-10} plane{x,-10}
  14.  pigment{checker Cyan,Yellow}
  15. }
  16.  
  17. #declare Digit =
  18.  array[4][10]
  19.  { 
  20.    {7,6,7,0,2,1,6,5,5,0},
  21.    {1,2,3,4,5,6,7,8,9,0},
  22.    {0,9,8,7,6,5,4,3,2,1},
  23.    {1,1,2,2,3,3,4,4,5,5}
  24.  }
  25.  
  26. union{
  27.  union{
  28.   text{ttf "cyrvetic.ttf",
  29.    concat("dimensions(Digit)=",str(dimensions(Digit),0,0)),0.1,0 translate 2*y}
  30.   text{ttf "cyrvetic.ttf",
  31.    concat("dimension_size(Digit,1)=",str(dimension_size(Digit,1),0,0)),0.1,0 translate y}
  32.   text{ttf "cyrvetic.ttf",
  33.    concat("dimension_size(Digit,2)=",str(dimension_size(Digit,2),0,0)),0.1,0 }
  34.    scale 0.7
  35.    translate <-1.25,1,0>
  36.  }
  37.  #declare J=0;
  38.  #while (J<4)
  39.    #declare I=0;
  40.    #while (I<10)
  41.       text{ttf "cyrvetic.ttf",str(Digit[J][I],0,0),0.1,0
  42.       translate <I*.6,-J*1,0>}
  43.       #declare I=I+1;
  44.    #end
  45.    #declare J=J+1;
  46.  #end
  47.  pigment{Red}
  48.  translate <-3,1,0>
  49. }
  50.  
  51.