|
![](/i/fill.gif) |
Back in 2000, Warp posted an interesting isosurface pigment to help someone
asking about contour maps:
http://news.povray.org/povray.advanced-users/thread/<3A2CEC7C.83FC2739@psu.edu>/
I've modified the code slightly, and am attempting to do something simple (I
think). I'd like to create a contour pigment that can be applied to either an
isosurface (with results similar to Warp's) or to a plane where the contour
lines match up with the 3D gradient pattern.
I'm having trouble understanding how to correctly implement a non-gradient
pigment that can be applied to either the isosurface or the plane. Surely I'm
making this way harder than it really is...?
My (incorrect) attempt to modify Warp's code looks like this:
-------
#version 3.6;
#include "functions.inc"
#declare f_isobar =
function { y-f_noise3d(x,y,z) }
#declare CMap =
color_map{
[0.0 rgb <0, 0.0, 0.0>]
[0.1 rgb <0, 0.0, 0.0>]
[0.1 rgb <1, 0.7, 0.2>]
[1.0 rgb <1, 0.7, 0.2>]
}
#declare PContour =
pigment
{
gradient y
color_map {CMap}
scale <1, 1/4, 1>
}
#declare PContour2 =
pigment{
function {f_isobar(x,y,z)}
color_map {CMap}
scale <1, 1/4,1>
}
camera {location <0, 15, 0> look_at 0}
light_source {<50, 200, -100>, 1}
isosurface
{
function { f_isobar(x,y,z) }
contained_by {box {<-5,0,-5><5,1,5>}}
scale <1,4,1>
pigment {PContour}
finish { specular .25 }
}
plane {y, 0.5 scale <1,4,1> pigment{PContour2} finish { specular .25 }}
Post a reply to this message
|
![](/i/fill.gif) |