home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / SPLINE.ZIP / TENTACLE.POV < prev    next >
Encoding:
Text File  |  1997-03-10  |  880 b   |  29 lines

  1. // SPLINE GENERATOR SAMPLE: SPLINE BASED OBJECT
  2. // ********************************************
  3.  
  4. camera {location <0, 70, -20> look_at <0, 0, 0> angle 40}
  5. light_source {<10, 60, 10> rgb 1}
  6.  
  7. #declare Smoothness = 50
  8.  
  9. union {
  10.    #declare Smoothness = (1 / Smoothness)
  11.    #declare Count = 0 #while (Count < 1)
  12.       #declare spline_clock = Count #include "Smooth.spl"
  13.       #declare CurPoint = spline_pos
  14.       #declare CurRadius = (1 - abs(Count * 2 - 1)) * 3
  15.  
  16.       #ifdef (PrevPoint)
  17.          sphere {PrevPoint, PrevRadius}
  18.          cone {PrevPoint, PrevRadius, CurPoint, CurRadius}
  19.       #end
  20.  
  21.       #declare PrevPoint = CurPoint
  22.       #declare PrevRadius = CurRadius
  23.    #declare Count = Count + Smoothness #end
  24.  
  25.    pigment {bozo color_map {[0 rgb <0, .2, .7>] [1 rgb <.2, .6, 1>]}
  26.       scale 10}
  27.    normal {bumps .5 scale .75}
  28.    finish {phong .3}}
  29.