POV-Ray : Newsgroups : povray.general : Gradient over a sphere Server Time
28 Nov 2024 19:49:51 EST (-0500)
  Gradient over a sphere (Message 1 to 3 of 3)  
From: motorsep
Subject: Gradient over a sphere
Date: 20 Sep 2006 11:40:00
Message: <web.4511605947c9c4c0a6c42ffe0@news.povray.org>
I am trying to make a gradient going from sky blue from the top to kind of
pink/yellow looking color on the bottom on a sphere object. So it's only
two colors, top is blue, bottom is orange with smooth transition in the
middle. Here is the rendering and code:

http://img231.imageshack.us/img231/3776/skysphereef9.jpg

pigment {
      gradient y
      color_map {
            [0.0   color rgb <0.313, 0.610, 1>]
      [1.0   color rgb <1, 0.887, 0.653>]
   }
     }

What do I do wrong? Why do I get bunch of gradients?


Post a reply to this message

From: Warp
Subject: Re: Gradient over a sphere
Date: 20 Sep 2006 11:51:49
Message: <45116395@news.povray.org>
motorsep <nomail@nomail> wrote:
> What do I do wrong? Why do I get bunch of gradients?

  Because your sphere is larger than 1?

  The 'gradient y' pattern goes from 0*y to 1*y and then repeats.
You have to scale it to match the size of the sphere.
  For example, if your sphere is centered at the origin and its
radius is 2, you have to "translate -y*.5 scale 4" the pigment.

-- 
                                                          - Warp


Post a reply to this message

From: motorsep
Subject: Re: Gradient over a sphere
Date: 20 Sep 2006 12:35:00
Message: <web.45116d27e695ce98a6c42ffe0@news.povray.org>
Thank you! Got it done :)


Post a reply to this message

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