POV-Ray : Newsgroups : povray.general : Is a circular gradient possible? Server Time
4 Nov 2024 19:14:58 EST (-0500)
  Is a circular gradient possible? (Message 1 to 4 of 4)  
From: wilhelm
Subject: Is a circular gradient possible?
Date: 14 May 2010 11:15:00
Message: <web.4bed6873360dbc1e70fdf2650@news.povray.org>
I need an image of a simple circle with a color gradient from the perimeter to
the center. Can that be drawn in povray? I've tested gradient but that only goes
in one direction.

thanks


Post a reply to this message

From: clipka
Subject: Re: Is a circular gradient possible?
Date: 14 May 2010 11:40:13
Message: <4bed6edd$1@news.povray.org>
Am 14.05.2010 17:12, schrieb wilhelm:
> I need an image of a simple circle with a color gradient from the perimeter to
> the center. Can that be drawn in povray? I've tested gradient but that only goes
> in one direction.

try the "spherical", "cylindrical", "onion" or "wood" patterns.


Post a reply to this message

From: Warp
Subject: Re: Is a circular gradient possible?
Date: 14 May 2010 13:34:22
Message: <4bed899d@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 14.05.2010 17:12, schrieb wilhelm:
> > I need an image of a simple circle with a color gradient from the perimeter to
> > the center. Can that be drawn in povray? I've tested gradient but that only goes
> > in one direction.

> try the "spherical", "cylindrical", "onion" or "wood" patterns.

  And if none of those meets your exact needs, you can always write your
own pattern function (by writing a user-defined function and using it as
a pattern).

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Is a circular gradient possible?
Date: 14 May 2010 18:43:03
Message: <4bedd1f7@news.povray.org>

> Am 14.05.2010 17:12, schrieb wilhelm:
>> I need an image of a simple circle with a color gradient from the
>> perimeter to
>> the center. Can that be drawn in povray? I've tested gradient but that
>> only goes
>> in one direction.
>
> try the "spherical", "cylindrical", "onion" or "wood" patterns.

NON-repeating patterns:

spherical goes from 1 at the origin and drop to zero at a spherical 
radius of 1 and stay at that value.

Cylindrical evaluate to 1 on the y axis and drop to zero at a radius of 1.

Repeating patterns:

onion start at zero at the origin, goes to 1 at radius 1, then drop back 
to 0. It can be seen as a spherical gradient. onion use a ramp_wave.

wood evaluate to zero along the z axis. You can look at it as a 
cylindrical gradient pattern. wood use a triangle_wave.

Try those alone:
plane{-z,0 pigment{wood color_map{[0 rgb 0][1 rgb 1]}ramp_wave} 
finish{ambient 1}translate 5*z}
plane{-z,0 pigment{onion } finish{ambient 1}translate 5*z}

Both of those render identicay.


Alain


Post a reply to this message

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