POV-Ray : Newsgroups : povray.general : Newbie: Candy Cane stripes on a cone? Server Time
16 Nov 2024 01:18:35 EST (-0500)
  Newbie: Candy Cane stripes on a cone? (Message 1 to 6 of 6)  
From: James Fitzgerald
Subject: Newbie: Candy Cane stripes on a cone?
Date: 13 Oct 1998 19:15:52
Message: <3623D03E.ED84F44B@argoneng.com>
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.


Post a reply to this message

From: Ken
Subject: Re: Newbie: Candy Cane stripes on a cone?
Date: 13 Oct 1998 22:37:49
Message: <36240052.B4D48CBF@pacbell.net>
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.


Post a reply to this message

From: Dan Connelly
Subject: Re: Newbie: Candy Cane stripes on a cone?
Date: 13 Oct 1998 22:58:55
Message: <36240543.D98C59D4@flash.net>
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/


Post a reply to this message

From: ReVerSi
Subject: Re: Newbie: Candy Cane stripes on a cone?
Date: 14 Oct 1998 17:20:49
Message: <3625075C.3FE0@t-online.de>
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.

Could be this, what you're looking for:

//PoV-Code~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cone {<0, 0, 2>, 3, <0, 0, -2>, 0
        pigment {spiral1 1 color_map{[0 Red]
                                     [0.5 Red]
                                     [0.5 White]
                                     [1 White]}
                frequency 2
                scale <1, 1, 4>
                translate <0, 0, -2>}
      rotate <90, 180, 0>
     }
//End of Pov-code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ReVerSi


Post a reply to this message

From: =Bob
Subject: Re: Newbie: Candy Cane stripes on a cone?
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

From: Dan Connelly
Subject: Re: Newbie: Candy Cane stripes on a cone?
Date: 15 Oct 1998 07:17:22
Message: <3625CB95.9B673005@flash.net>
=Bob wrote:
> 
> Umm, just a thought here: how about the pigment patterns spiral1 or spiral2?


You are correct, of course....

I really flubbed that one -- I even used this technique to
render tape on a baseball bat a few months ago.  When I reread
the spiral1 doc entry, though, I was confused about how
it extended into 3d.  Anyway, spiral1 it is...

Dan

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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