3

Can someone please tell me how I can do the following with a POVRay texture...

//PseudoCode
texture {
    pigment {
        if(y mod 5 == 0) {
            color rgb 0
        } else {
            color rgb 1
        }
    }
}

ie - I want to get the equivalent of Contour lines

Basic
  • 26,321
  • 24
  • 115
  • 201

1 Answers1

4

Why not use a simple gradient?

pigment {
  gradient y       
  color_map {
    [0.0  color rgb 0]
    [0.8  color rgb 0]
    [0.8  color rgb 1]
    [1.0  color rgb 1]
  }
  scale 5
}
Niki
  • 15,662
  • 5
  • 48
  • 74