|
![](/i/fill.gif) |
Excellent! Something to bite into, rather than vague generalities... Examples are
good.
I generated mutually exclusive regions with cgi.
========================================================
global_settings {max_trace_level 255}
camera {
perspective
location <-6, 2, -10> // change x to 0 or +6
look_at <0, 1.3, 0>
right x*image_width/image_height
angle 18
}
light_source {
<0, 0, 0>
color rgb <1, 1, 1>
translate <-30, 30, -30>
}
sky_sphere {
pigment {
radial
frequency 100
color_map{
[0.0 rgb 0]
[0.5 rgb 0]
[0.5 rgb 1]
[1.0 rgb 1]
}
}
}
plane {
y, 0
pigment { checker
rgb 1
rgb 1.5
}
}
#declare pigment_1 =
pigment{ color rgbf <.5,.5,1,1> }
#declare pigment_2 =
pigment{ color rgbf <1,.5,.5,1> }
#declare ior_1 = 1.3;
#declare ior_2 = 1.0;
#declare r1 = <-.4,1.3,0>;
#declare r2 = <.4,1.3,0>;
#declare sphere_1 =
sphere{
0,1
translate r1
}
#declare sphere_2 =
sphere{
0,1
translate r2
}
#declare region_1 =
difference {
object { sphere_1 }
object { sphere_2 }
texture { pigment { pigment_1 } }
interior { ior ior_1 }
}
#declare region_2 =
difference {
object { sphere_2 }
object { sphere_1 }
texture { pigment { pigment_2 } }
interior { ior ior_2 }
}
#declare region_12 =
intersection {
object { sphere_1 }
object { sphere_2 }
texture {
pigment {
average
pigment_map {
[0.5 pigment_1]
[0.5 pigment_2]
}
}
}
interior {
ior ior_1 + ior_2
}
}
// consider two options: 1 and 2
#declare option = 1;
#if (option = 1)
union {
object { region_1 }
object { region_2 }
object { region_12 }
}
#end
#if (option = 2)
merge {
object { region_1 translate -r1 scale 1.0001 translate r1}
object { region_2 translate -r2 scale 1.0001 translate r2}
object { region_12 scale 1.0001 }
}
#end
============================================================
These two cases give much different results.
Dan
Post a reply to this message
|
![](/i/fill.gif) |