home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_060 / pov3demo / other / gridloop.pov < prev    next >
Text File  |  1997-12-12  |  844b  |  33 lines

  1. // Persistence Of Vision Raytracer version 3.0 sample file.
  2. // GRIDLOOP.POV
  3. // Demonstrates nested looping (for/next loop, the hard way)
  4.  
  5. #version 3.0
  6. global_settings { assumed_gamma 2.2 }
  7. #include "colors.inc"
  8. #include "textures.inc"
  9.  
  10. camera {
  11.    location <0, 0, -20>
  12.    up <0,1,0>
  13.    direction z
  14.    right x* 4/3
  15.    look_at <0, 0, 0>
  16. }
  17.  
  18. light_source { <0, 35, -25> White }
  19.  
  20. #declare XSIZE = 10
  21. #declare YSIZE = 10
  22.  
  23. #declare I = -YSIZE /2                          // initialize  I
  24. #while (I <= YSIZE /2)                          // for I =
  25.     #declare J= -XSIZE /2                       // initialize J
  26.     #while (J <= XSIZE /2)                      // for J =
  27.         sphere { <I,J,0>, 0.5 pigment { White } }
  28.         #declare J=J+1                          // next J
  29.     #end
  30.     #declare I=I+1                              // next I
  31. #end
  32.  
  33.