POV-Ray : Newsgroups : povray.beta-test : Slope pattern : Re: Slope pattern Server Time
30 Jul 2024 22:22:46 EDT (-0400)
  Re: Slope pattern  
From: Ron Parker
Date: 24 Sep 2001 16:42:53
Message: <slrn9qv6mf.pbu.ron.parker@fwi.com>
On Sun, 23 Sep 2001 15:31:52 -0400, Trevor Quayle wrote:
>3.5 beta3 Windows
>
>Slope pattern still does not work for slope = 1
>See attached scene file, the flat top of the object should be red.

This is because maps "wrap around" at 1, with the value exactly equal to
1 not being represented in the map.  Something with slope exactly equal 
to 1 (well, not really, but you know what I mean) will use the value at the 
0 end of the map.

A temporary workaround is to use 

      color_map{
        [.000001 red 1]
        [.000001 rgbt 1]
        [0.5 rgbt 1]
        [1.0 red 1]
      }

instead of the color_map you had.  This is technically correct behavior,
but it's worth discussing whether the slope pattern should be an exception
to the rule.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

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