POV-Ray : Newsgroups : povray.general : Newbie: Candy Cane stripes on a cone? : Re: Newbie: Candy Cane stripes on a cone? Server Time
13 Aug 2024 07:17:48 EDT (-0400)
  Re: Newbie: Candy Cane stripes on a cone?  
From: =Bob
Date: 15 Oct 1998 05:45:36
Message: <3625b630.0@news.povray.org>
Umm, just a thought here: how about the pigment patterns spiral1 or spiral2?

cylinder {-1*y,1*y,1 pigment { spiral1 2 color_map { //2 here is arm #
         [0,.5 color red 1 color red 1]
         [.5,1 color rgbf 1 color rgbf 1]
         } rotate 90*x} //note rotation here, starts in z-axis
         }
cylinder {-1*y,1*y,.99 pigment { rgb 1}}

This is applicable to cone too.

Message <36240543.D98C59D4@flash.net>, Dan Connelly  typed...
>
>From textures.inc :
>
>// Red & white stripes - Looks best on a y axis Cylinder
>// It "spirals" because it's gradient on two axis
>#declare Candy_Cane = 
>pigment {
>    gradient x+y
>    color_map {
>        [0.25 rgb <1,0,0>]
>        [0.25 rgb <1,1,1>]
>        [0.75 rgb <1,1,1>]
>        [0.75 rgb <1,0,0>]
>    }
>}
>
>---------------------------
>
>Note this is not a spiral, but simply rotated independent
>stripes. 
>
>A functional linear combination of gradient y and radial 
>with an appropriate pigment map would do the
>trick, but I am not sure if the syntax exists to do this.
>
>Of course, one could always use an image_map with cylindrical
>mapping.
>
>Dan
>
>Ken wrote:
>> 
>> For  a clue how to do it look at the textures in textures.inc.
>> Down at the bottom of the list of textures are some examples
>> or spiraling stripes called coincidedntly Cane.
>> 
>> Ken
>> 
>> James Fitzgerald wrote:
>> 
>> > How would I do candy cane stripes on a cone?
>> > I've looked through the docs, can't seem to find what I'm looking for.
>> > Any ideas on how I could do this?
>> > Ideally I would want the z distance of the stripe height to stay the
>> > same
>> > (so the stripes appear to get bigger down the cone simply because
>> > they're
>> > taking up more area in the other directions).
>> >
>> > -JamesF.
>
>-- 
>http://www.flash.net/~djconnel/

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

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