|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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 }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote:
>
> This is the source for a Candy Cane that Chris Huff was kind enough
> to share with me.
>
> Enjoy,
>
> --
> Ken Tyler
>
Here's my crude attempt. I thought a rotated marble pigment should do it, but
working on that I realized that an image_map would probably be much better. Ken?
Remco
Post a reply to this message
Attachments:
Download 'candycane2.pov.txt' (1 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Remco de Korte wrote:
> Here's my crude attempt. I thought a rotated marble pigment should do it, but
> working on that I realized that an image_map would probably be much better. Ken?
>
> Remco
Thank you for sharing this with me Remco. I am a bit surprised at your
solution using the checker pattern but whatever works in this whacky world !
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Actually, there is one(where it blends from white to red). But it is
VERY thin. I didn't bother to adjust the color_map, I was just
demonstrating one method of doing a candy cane. I also didn't give the
texture a glossy, slightly reflective finish, a faint and slightly
uneven spiral normal(possible!), and translucence(transparent texture
and highly dense media-I wish there was a specialized translucency
feature!).
Also, the number of cylinders and spheres used may not be enough for
some scenes. Just change the stickParts and curveParts variables.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|