|
![](/i/fill.gif) |
If I might, a modest suggestion. A thin pink region for the color
map where the two colors mix in the manufacturing process.
Ken wrote:
>
> This is the source for a Candy Cane that Chris Huff was kind enough
> to share with me.
>
> Enjoy,
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net
>
> Here is my candy cane, hope it is what you are looking for.
>
> #declare CandyCane =
> union {
> #declare ccTex =
> texture {
> pigment {
> radial
> frequency 2
> color_map {
> [ 0.0 color rgb < 0.933333, 0.933333, 0.933333 > ]
> [ 0.475 color rgb < 0.933333, 0.933333, 0.933333 > ]
> [ 0.525 color rgb < 0.937255, 0.121569, 0.113725 > ]
> [ 1.0 color rgb < 0.937255, 0.121569, 0.113725 > ]
> }
> }
> }
> //***User Parameters
> #declare stickParts = 100;
> #declare stickLen = 2;
> #declare totalRot = 360;
> //***
> sphere { < 0, 0, 0 >, 0.1 texture {ccTex}}
> //***Loop Initialization
> #declare partRot = totalRot/stickParts;
> #declare k=0;
> #while(k < stickParts)
> #declare segSt = < 0, stickLen/stickParts*k, 0 >;
> #declare segEnd = < 0, stickLen/stickParts*(k+1), 0 >;
>
> cylinder {segSt, segEnd, 0.1 texture {ccTex rotate < 0, partRot*k, 0>}}
>
> #declare k=k+1;
> #end
>
> //***User Parameters
> #declare curveParts = 100;
> #declare curveArc = 200;
> #declare curveRad = 0.5;
> //***
> //***Loop Initialization
> #declare curveLen = curveRad*2*pi*(curveArc/360);
> #declare k=0;
> #while(k < curveParts)
>
> sphere {< 0, 0, 0 >, 0.1
> texture {ccTex rotate < 0, partRot*k, 0>}
> translate < -(curveRad), 0, 0>
> rotate < 0, 0, -k*(curveArc/curveParts)>
> translate < curveRad, stickLen, 0>
> }
>
> #declare k=k+1;
> #end
> }
>
> object { CandyCane }
--
<blink>------------------------------------</blink>
http://www.giwersworld.org/artsii/
Finally up on 99/06/22
Post a reply to this message
Attachments:
Download 'us-ascii' (1 KB)
|
![](/i/fill.gif) |