POV-Ray : Newsgroups : povray.general : Possible bug with "frequency" in maps : Possible bug with "frequency" in maps Server Time
2 Aug 2024 06:15:51 EDT (-0400)
  Possible bug with "frequency" in maps  
From: Jellby
Date: 5 Jan 2005 13:36:26
Message: <41dc33a9@news.povray.org>
Hi,

Has this been already discussed? I didn't find anything relevant.

When using non-integer "frequency" value in "color_map" (or "pigment_map" or
whatever) with "gradient", there's a behavior change at the origin.
Consider this almost minimal example:

----------------------------------
camera { location -10*z look_at 0 }
light_source { 20*<-1, 1, -1>, color rgb 1.5 }
box { -4, 4
  pigment { gradient y
    color_map {
      [0.0 color rgb <1, 0, 1>]
      [1.0 color rgb <0, 1, 1>]
    }
    // see the difference between the positive and negative zones
    // it looks fine with integer values
    // it looks "funny" with non-integer values
    frequency 0.5
  }
  scale 0.8
}
----------------------------------

Below the y=0 plane, the gradient looks OK, with a period twice as large as
normal. Above the plane, the period is still 1 unit, but the colour range
has been stretched and clipped. A similar things happens with other
non-integer values, try 1.5, for example. It looks like the positive part
is forced to have a period of 1 unit "superimposed" on whatever other
period there might be.

I've only tested this with "gradient" (only with "gradient y", to be true),
but it happens with all waveforms (sine_wave, triangle_wave...)

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

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