POV-Ray : Newsgroups : povray.text.scene-files : A Candy Cane Server Time
28 Jul 2024 18:15:53 EDT (-0400)
  A Candy Cane (Message 1 to 5 of 5)  
From: Ken
Subject: A Candy Cane
Date: 27 Jun 1999 09:06:17
Message: <37762200.B79ABBC7@pacbell.net>
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

From: Remco de Korte
Subject: Re: A Candy Cane
Date: 27 Jun 1999 19:35:27
Message: <3776B423.9AE930CD@xs4all.nl>
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)

From: Ken
Subject: Re: A Candy Cane
Date: 27 Jun 1999 20:10:34
Message: <3776BD96.122C761C@pacbell.net>
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

From: Matt Giwer
Subject: Re: A Candy Cane
Date: 28 Jun 1999 16:06:29
Message: <3777D5CD.7B4013E2@giwersworld.org>
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)

From: Chris Huff
Subject: Re: A Candy Cane
Date: 29 Jun 1999 21:43:58
Message: <37797763.51BCE354@compuserve.com>
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

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