|
|
Ron Parker <ron### [at] povrayorg> wrote:
: Another problem with your proposed solution is the problem of non-convex
: objects. The "first intersection belongs to the object" criterion should
: instead read "the ray intersects the object an odd number of times."
You are right. However, sometimes this self-shadowing of non-convex object
is the correct behaviour (when the self-shadowing happens from "outside" the
surface) and sometimes it's unwanted (when it happens from the "inside").
I can't think of any way of detecting which one is the case.
: Another problem appears if your sphere contains (for example) another slightly
: smaller sphere - the smaller sphere will shadow the larger one.
I think it's possible to ignore all the objects inside the current object
(ie. if the intersection point with the other object is inside this object,
then we just ignore it).
However, there's still a problem: If our sphere is "hollow", ie it is the
difference of a sphere and a bit smaller sphere, and then there's another
object inside this hollow sphere.
I added some comments about this to the page.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|