|
![](/i/fill.gif) |
Dav_shef nous apporta ses lumieres en ce 19/10/2006 05:09:
> Alain <ele### [at] netscape net> wrote:
>> Dav_shef nous apporta ses lumieres en ce 18/10/2006 05:20:
>>> Hi All,
>>> I am trying to get a sphere with a radial colour gradient.
>>> For example, a red sphere that gradually becomes white in its center.
>>> Is there a way to do that ?
>>> Cheers
>>> Dav
>> You can use the spherical pattern. It goes from a value of 1 at the origin and
>> drop to zero at a radius of 1 then stay there.
>> Use it with color_map{[0 Red][1 White]} and scale that to your spgere radius.
>> The onion proposed by Chris B is similar but repeats itself each unit radius.
>> If your sphere is transparent, you can use the same pattern, but use it to
>> madulate the density of a media filling the sphere. Don't forget to add hollow
>> to your sphere so that it can actualy contain the media.
> Yeah, but do I exactly use this spherical pattern ? can you give me a short
> example ?
> Cheers
> Dav
As a pigment: pigment{spherical color_map{[0 rgb<1,0,0>][1 rgb 1]}scale Some_Scale}
It won't be visible unless you cut out part of the object with a difference or
intersection.
As a media density:
interior{media{emission 1 density{spherical color_map{[0 Red][1 White]}scale
Some_Scale}}}
Sample using emissive media, but you can also use absorbing or scattering media.
The pattern is centered around the origin or <0,0,0>.
--
Alain
-------------------------------------------------
about it.
Post a reply to this message
|
![](/i/fill.gif) |