POV-Ray : Newsgroups : povray.general : color shift : Re: color shift Server Time
2 Aug 2024 00:15:34 EDT (-0400)
  Re: color shift  
From:
Date: 19 Feb 2005 11:17:03
Message: <4217667f$1@news.povray.org>
// Hi Barehunter,
//
// the possible artifacts mentioned by Slime are most easily
// avoided with triangle_wave. Note the multiplication by 2
// in the scale; this is neccesary because the triangle_wave
// pattern contains 2 repetitions of the gradient pattern
// (one "forward" and one "backward").
//
// If you delete the key word "triangle-wave", remove "2*"
// from the scale, and render without anti-alias, the artifacts
// become visible, esp. on the black underside.
//
//    Sputnik


#declare BoxX = 1;
#declare BoxY = 2;
#declare BoxZ = 3;

#declare Box =
  box { 0, <BoxX, BoxY, BoxZ>
    pigment {
      gradient y
      triangle_wave
      color_map { [0 red 0] [1 red 1] }
      scale <1, 2*BoxY, 1>
      }
    finish { ambient 1 diffuse 0 }
    translate -<BoxX, BoxY, BoxZ>/2
    }

background { rgb 0.3 }

object { Box rotate -20*x translate <-BoxX, 0, 1.5*BoxZ> }
object { Box rotate  20*x translate < BoxX, 0, 1.5*BoxZ> }


Post a reply to this message

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