POV-Ray : Newsgroups : povray.general : Apparent Error in Cylindrical Pigment Map : Re: Apparent Error in Cylindrical Pigment Map Server Time
8 Aug 2024 18:19:02 EDT (-0400)
  Re: Apparent Error in Cylindrical Pigment Map  
From: Chris Colefax
Date: 4 Nov 2000 21:58:30
Message: <3a04ccd6@news.povray.org>
Dawn McKnight <mck### [at] maccom> wrote:
> So, I'm working on this object.  I won't bore you by telling you what it
> is, or what I'm using it for, or like that, but I will say that I'm
> trying to get a smooth color gradient between the edge and the center,
> which is to say, I need it to be a gradient in both x and z directions,
> constant as per y.
[snip]
> color_map {
> [1.0 color Yellow]
> [0.1 color Blue]
[snip]

The problem is with your colour map, as quoted above.  Although, as the docs
state, the colours 'start' at the origin with a colour map index of 1,
progressing to the edge of the cylinder with a colour map index of 0, colour
maps must always be specified in increasing order of indices, e.g.:

   color_map {[0.1 color Blue] [1 color Yellow]}

Using this, you should get the colour interpolation you expect.  All in all,
it's probably best to think of the colour map moving *inward* from the
outside edge to the centre axis of the cylinder, rather than vice versa.


Post a reply to this message

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