|
![](/i/fill.gif) |
I have created two isosurface regions with a sine wave pattern. They are
supposed to be two clear liquids in a tank. They will have different
refractive indicies. To test it, I have been trying to put the same refractive
index and the sine wave pattern should disappear. It does not disappear
however. And the visible "weird" pattern is a lot larger than the .0001 space
I have left between the regions (I have also tried doing a merge operator, but
I still cannot make the pattern vanish as it should with two regions with
identical properties). I am aware that since I am rotating the pattern to
create the top region that I must account for this. I have tried to, but
perhaps I have done it wrong; I have tried many possibilities actually. The
code is below and I have posted an image in the image section.
Thanks,
Mike
#include "colors.inc"
#include "textures.inc"
global_settings{
max_trace_level 25
}
sphere
{
0, 1000 hollow pigment {color White}
}
camera {
location <0, 3, 20>
look_at <0, 3, 0>
angle 20
}
#declare Tank=
difference
{ box { <-2,.1,-2>,<2,5.1,2> }
box { <-1.9,.2,-1.9>,<1.9,5.01,1.9> }
texture{
pigment{color rgbf<1, 1, 1,0.95>}
finish{
reflection {
0.0, 1.0
fresnel on
}
conserve_energy
}
}
interior{ior 1.4 }//fade_power 2 fade_distance 2}
}
#declare MaterialAlcohol =
material {
texture {
pigment {
color rgbf<1, 1, 1,1>
}
finish {
ambient 0.0
diffuse 0
reflection {
0.0, 1.0
fresnel on
}
conserve_energy
specular 0
roughness 0
}
}
}
#declare AlcoholRegion=
isosurface {
function {
//(y-2.9999)
( y-2.9999 + .1/2*(sin(3*6.2832*(x))-sin(3*6.2832*z)) )
}
evaluate 6, 1.4, 0.7
accuracy .00001
contained_by { box { <-1.899, .21, -1.899>, <1.899, 3.5, 1.899> } }
all_intersections
material { MaterialAlcohol }
interior {
ior 1.38
}
}
#declare HeavyLiquidRegion=
isosurface {
function {
//(y-5)
( y-5 + .1/2*(sin(3*6.2832*x)+sin(3*6.2832*z)) )
}
evaluate 6, 1.4, 0.7
accuracy .00001
contained_by { box { <-1.899, 3, -1.899>, <1.899, 7.5, 1.899> } }
all_intersections
material { MaterialAlcohol}
interior {
ior 1.38
}
rotate 180*z
translate 8*y
}
//merge{
object{HeavyLiquidRegion}
object{AlcoholRegion}
//}
light_source {
<4, 8, 10>
color White
spotlight
radius 30
falloff 14
tightness 10
point_at <0, 5, 0>
}
object{Tank}
plane{x,-400 texture{pigment{White}finish{ambient 0 diffuse 1}}}
plane{x,400 texture{pigment{White}finish{ambient 0 diffuse 1}}}
plane{z,-100 texture{pigment{White}finish{ambient 0 diffuse 1}}}
plane{z,400 texture{pigment{White}finish{ambient 1 diffuse 1}}}
//plane{y,0 texture{pigment{White}finish{ambient 0 diffuse 1}}}
box{ <-2,.1,-2.2>,<2,5.6,-3>
texture{pigment{White}finish{ambient 0 diffuse 1}}
photons{ target refraction on reflection on}
}
Post a reply to this message
|
![](/i/fill.gif) |