POV-Ray : Newsgroups : povray.advanced-users : Texture transition : Re: Texture transition Server Time
29 Jul 2024 00:29:39 EDT (-0400)
  Re: Texture transition  
From: Slime
Date: 2 Jun 2003 01:53:50
Message: <3edae66e@news.povray.org>
> What I want is for all points where y >= +100 to be red, all points where
y
> <= -100 to be blue, and the points inbetween to be linearly interpolated.
I
> can get red -> blue -> red, and I can get blue -> red -> blue, but how do
I
> get red -> blue?


If all else fails:

function {
    select(y-100,
        // if y < 100
        select(y-(-100),
            0 // if y < -100
            (y-(-100))/200 // else (y >= -100)
        ),
        1 // else (y >= 100)
    )
}
color_map {
    [0 rgb <0,0,1>]
    [1 rgb <1,0,0>]
}

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

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