|
|
Bug found by Alun in povray.general post "Problem with multiple f_hetero_mf
isosurfaces" 10/Sep/2003
The following code demonstrates a bug.
Set ShowBug to false to see the right-hand iso-surface as it should be.
Set ShowBug to true to see what happens when a second f_hetero_mf is rendered.
The right-hand iso should stay the same, but it doesn't. In addition, the bug
does not produce consistent results (well, they seem consistently wrong, but the
resulting iso is different on subsequent renders).
I don't know whether the bug applies to other functions.
#version 3.5;
#declare ShowBug = true;
#include "functions.inc"
camera {location -3*z look_at -y/2}
light_source { 2*y-z rgb 1 }
#declare IS1 =
isosurface {
function { 2+y - f_hetero_mf(0.2+x,0,z, 0.9, 1.7, 12, 0.5,0.9, 3 ) }
contained_by { sphere {0 1} }
evaluate 5, 1.2, 0.95
pigment { rgb <0.7,0.8,0.9> }
translate x*1.2
}
#declare IS2 =
isosurface {
function { 2+y - f_hetero_mf(0.2+x,0,z, 0.9, 1.7, 4, 0.5, 0.9,3 ) }
contained_by { sphere {0 1} }
evaluate 5, 1.2, 0.95
pigment { rgb <0.5,0.8,0.6> }
translate -x*1.2
}
object{IS1} // this object will change depending on whether IS2 is rendered or
not.
#if(ShowBug)
object{IS2}
#end
--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
Post a reply to this message
|
|