home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / anim / quilted / plotqlt.pov < prev   
Text File  |  1997-12-12  |  1KB  |  54 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // By Chris Young 76702,1655
  3. // Try changing C0 and C1 to various values from 0.0 to 1.0 in this scene.
  4.  
  5. #version 3.0
  6. global_settings { assumed_gamma 2.2 }
  7.  
  8. #include "colors.inc"
  9.  
  10. #declare C1=1
  11. #declare C0=clock
  12. #declare Rad=1/6/10
  13.  
  14. #declare Xval=-0.5
  15.  
  16. camera {
  17.     location  <0, 0, -150>
  18.     direction <0, 0,  12>
  19.     look_at   <0, 0,   0>
  20. }
  21.  
  22. light_source { <5000, 10000, -20000> color White}
  23. plane { z, Rad pigment {checker color rgb <1,.8,.8> color rgb <1,1,.8>} }
  24.  
  25. #declare Font="cyrvetic.ttf"
  26. text{ ttf Font
  27.     concat("C0 =",str(C0,1,3)),0.5, 0
  28.     scale <1.25, 1.25, 4>
  29.     translate <-2.75, 4, -30>
  30.     pigment { rgb <0.2, 0.8, 0.6> }
  31. }
  32. text{ ttf Font
  33.     concat("C1 =",str(C1,1,3)),0.5, 0
  34.     scale <1.25, 1.25, 4>
  35.     translate <-2.75, 2.5, -30>
  36.     pigment { rgb <0.2, 0.6, 0.8> }
  37. }
  38.  
  39. union {
  40.     #while (Xval <= 0.5)
  41.         // This is the function that the "quilted" pattern uses
  42.         #declare T=sqrt(3*Xval*Xval)
  43.         #declare IT=1.0-T
  44.         #declare TQ=T*T*T+3*T*IT*IT*C0+3*T*T*IT*C1
  45.  
  46.         sphere{<Xval,TQ,0>,Rad pigment{Red}}
  47.  
  48.         #declare Xval=Xval+0.01
  49.     #end
  50.     scale 10
  51.     translate -5*y
  52. }
  53.  
  54.