|
![](/i/fill.gif) |
"Nicolas George" <nicolas$george@salle-s.org> wrote in message
news:458c2171@news.povray.org...
> "Chris B" wrote in message <458bd48e$1@news.povray.org>:
>> I may be missing something obvious to everyone else here, but why not
>> just
>> use merge instead of union to get rid of the internal coincident
>> surfaces?
>
> Because a merge does not avoid the problem of coincident surfaces. In
> fact,
> this is quite the opposite: using a merge instead of an union makes the
> problem worst.
>
Hi Nicolas,
The example I posted did not manifest this problem (even using different
colours).
> More precisely, coincident surfaces are cases where two objects share a
> same
> boundary surface. Due to calculations made with floating point arithmetic
> and not perfect mathematical objects, rounding errors occur, and the ray
> tracer may consider that the ray hit one object first and the other next,
> or
> the other way around.
>
Yes. I understood that bit.
> If both objects have exactly the same texture, it is not a problem at all.
>
A few things here:
o Firstly, substituting different colours for each of the two parts of
the merge in the example I posted didn't show a problem.
o Secondly, because the coincident surface is the one you don't want to
display, then why would you need to use a different texture for each
instance of it.
o Thirdly, if it causes a problem in the particular circumstances you
have and you really want to use a union, then why not just make the cutting
surfaces transparent as in the following example:
camera {location <0,0,-1> look_at 0}
light_source { <-1, 0.3, -2> color rgb 1}
light_source { <-1, 0.3, 2> color rgb 1}
union {
difference {
cylinder {-y,y*0.2,0.2}
plane {y,0 rotate z*225 pigment {color rgbt 1}}
pigment {color rgbt <1,1,0,0.7>}
}
difference {
cylinder {-x,x*0.2,0.2}
plane {y,0 rotate z*45 pigment {color rgbt 1}}
}
texture {
pigment {color rgbt <0,1,1,0.4>}
normal {agate}
}
rotate y*45
}
If you still get a problem, why not post a snippet that illustrates your
problem.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |