POV-Ray : Newsgroups : povray.advanced-users : Texture transition : Re: Texture transition Server Time
29 Jul 2024 06:14:31 EDT (-0400)
  Re: Texture transition  
From: POVeddie
Date: 3 Oct 2003 12:55:02
Message: <web.3f7da9a52e6f4f8f420d35110@news.povray.org>
Andrew Coppin wrote:
>If I use the "planar" map, I get a texture that goes from one colour, to
>another, and back to the first again, creating a thin band of the alternate
>colour. How do I make it so that everything above the line is one colour and
>everything below it is another? (Still with the nice smooth transition in
>between.)
>
>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?

Am I completely missing the point or is the following exactly what you asked
for?

cylinder {
  <0,0,0>, <0,1,0>, 25
  pigment {
    gradient y
    color_map {
      [0.00 color rgb <0,0,1>]
      [0.45 color rgb <0,0,1>]
      [0.55 color rgb <1,0,0>]
      [1.00 color rgb <1,0,0>]
    }
  }
  scale <1,200,1>
  translate<0,-100,0>
}

Cheers
Eddie


Post a reply to this message

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