home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / CLOCKMOD.ZIP / CLOCKP.INC < prev    next >
Encoding:
Text File  |  1997-06-24  |  2.0 KB  |  50 lines

  1. // *********************************************************
  2. // CLOCK MODIFIER PREVIEW FILE FOR PERSISTENCE OF VISION 3.x
  3. // *********************************************************
  4. //
  5. // Created by Chris Colefax, 24 June 1997
  6. //
  7. // NOTE: This file requires that ClockMod.inc be installed
  8. // See "ClockMod.txt" for more information.
  9. //
  10. // *********************************************************
  11.  
  12. // CHECK PREVIEW PARAMETERS
  13. // ************************
  14.    #declare _CM_tempver = version #version 3.0
  15.    #declare clock_preview = true
  16.    #ifndef (graph_continuous) #declare graph_continuous = false #end
  17.    #ifndef (graph_thickness)  #declare graph_thickness  = .02   #end
  18.    #ifndef (graph_only)       #declare graph_only       = false #end
  19.    #ifdef  (graph_smoothness) #declare _CM_clockint = 1 / graph_smoothness #else #declare _CM_clockint = 1 / 100 #end
  20.  
  21. // ADD CAMERA AND LIGHT
  22. // ********************
  23.    #if (graph_only = false)
  24.       camera {location <.5, .5, -2> look_at <.5, .5, 0> angle 45}
  25.       light_source {<5, 5, -20> rgb <1, 1, 1>}
  26.    #end
  27.  
  28. // CREATE GRAPH OBJECT
  29. // *******************
  30.    union {
  31.       box {<0, 0, 0>, <1, 1, .01> pigment {checker rgb .4, rgb .7 scale .1}}
  32.       #declare iclock = 0 #include "ClockMod.inc"
  33.       sphere {<0, mclock, 0>, graph_thickness}
  34.       #declare _CP_cpoint = <0, mclock, 0>
  35.       #declare _CM_x = _CM_clockint #while (_CM_x < 1 + _CM_clockint)
  36.          #declare iclock = _CM_x #include "ClockMod.inc"
  37.          #if (graph_continuous = false)
  38.             sphere {<_CM_x, mclock, 0>, graph_thickness}
  39.          #else
  40.             #declare _CP_ppoint = _CP_cpoint
  41.             #declare _CP_cpoint = <_CM_x, mclock, 0>
  42.             cylinder {_CP_ppoint, _CP_cpoint, graph_thickness}
  43.             sphere {_CP_cpoint, graph_thickness}
  44.          #end
  45.       #declare _CM_x = _CM_x + _CM_clockint #end
  46.       pigment {rgb <1, 0, 0>} finish {phong .3}}
  47.  
  48.    #declare clock_preview = false
  49.    #version _CM_tempver
  50.