POV-Ray : Newsgroups : povray.general : radial colour gradient : Re: radial colour gradient Server Time
31 Jul 2024 18:15:37 EDT (-0400)
  Re: radial colour gradient  
From: Dav shef
Date: 19 Oct 2006 05:05:01
Message: <web.45373f02fd7ce4e699678ae0@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "Dav_shef" <nomail@nomail> wrote in message
> news:web.4535f1f1ae8bc416699678ae0@news.povray.org...
> > 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
> >
>
> Hi Dav,
>
> Here's something that does what I think may be what you're asking for:
> I've done a difference so you can see the white center.
>
> light_source { <10, 20,-30> color rgb<1, 1, 1>}
> camera {location <1, 1, -3> look_at <0,0, 0>}
>
> difference {
>   sphere {0,1}
>   box {0,<1,1,-1>}
>   pigment {onion
>     color_map {
>       [0 color rgb <1,1,1>]
>       [1 color rgb <1,0,0>]
>     }
>   scale 1.001}
> }
>
> Regards,
> Chris B.


Thanks Chris, but that's not really what I was looking for.
but your code is quite cool, might use it for later on

cheers

Dav


Post a reply to this message

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