POV-Ray : Newsgroups : povray.general : 2 color sphere : Re: 2 color sphere Server Time
10 Aug 2024 17:25:35 EDT (-0400)
  Re: 2 color sphere  
From: Chris Huff
Date: 22 Nov 1999 17:35:14
Message: <221119991738217992%chrishuff_99@yahoo.com>
In article <3839c45f@news.povray.org>, David Vincent-Jones
<geo### [at] galaxynetcom> wrote:

> Should be very simple
> A sphere with one half red and one half white
> If I want multiple stripes it is really no problem but just half and half
> appears to elude me.

Try this:
sphere {<0, 0, 0>, 1
    pigment { gradient x
        color_map {
            [0.0 color Red]
            [0.5 color Red]
            [0.5 color White]
            [1.0 color White]
        }
        scale 2
        translate y*1
    }
}

The radius of the sphere is 1, so it is 2 units across. The gradient
needs to be translated and scaled to fit.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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