POV-Ray : Newsgroups : povray.text.scene-files : Kandy for Ken Server Time
31 Oct 2024 19:28:16 EDT (-0400)
  Kandy for Ken (Message 1 to 1 of 1)  
From: David Wilkinson
Subject: Kandy for Ken
Date: 27 Jun 1999 19:59:23
Message: <377bbae1.49018763@news.povray.org>
// Here is the source for the KandyCane.jpg in povray.binaries.images
// KandyCane.pov
// uses Striscia macros developed by Daniele Varrazzo <pir### [at] officineit>
// downloadable from http://members.xoom.com/dvarrazzo/
// Date: 28 June 1999
// Auth: D.G.Wilkinson <dav### [at] cwcomnet>

#version 3.1
#include "colors.inc"
#include "Striscia.inc" 

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <-3, 5, 5>
  direction 1.5*z
  right     4/3*x
  look_at   <3, 0,  1>
}

light_source {
  <-30, 30, 30>
  color rgb 1
}

#declare WalkingStick = splBezierSpline(array [12] {
                <0,0,0><1,0,0><5,0,0><6,0,0>, //straight stick
                <6,0,0><6.7,0,0> <7.2,0,0.3><7.2,0,1>,// handle - 1st quadrant
                <7.2,0,1><7.2,0,1.7> <6.7,0,2><6,0,2> //handle - 2nd quadrant

                                        }
                        )

#declare gPathDepth = 3;                  
SetPathSpline(WalkingStick)
                  
#declare CrossSection = splCircle(4)
#declare Stick=splScaleSpline(CrossSection, <0.15,0.15,1>)
SetShapeSpline(Stick)

SetWrappedTexture(
        texture {
           pigment {     
                 spiral1 12
                      color_map {
                        [0.35  color Red]
                        [0.4  color Blue]
                        [1    color White]
                      }
           rotate 90*x           
           scale 0.2      
           }
           finish { specular 0.8              
           }
        }
)

#declare EndCap =    cylinder {0,<0,0.01,0> 0.99
                texture {
                   pigment {
                         radial color_map {
                        [0.35  color Red]
                        [0.4  color Blue]
                        [1    color White]
                     }
                         frequency 4

                   }
                   finish {
                      specular 0.8              
                   }
                 }   
               rotate z*90 
               scale 0.15
}
    
#declare CandyCane = union{
   Striscia(UNION)
   object { EndCap }
   object { EndCap translate <6,0,2> } 
} 
              
object {CandyCane
 rotate 90*y
 translate <2,0,4>
} 
// end 
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.