|
![](/i/fill.gif) |
> I don't understand how this can work in a general case (ie. with any
> object and any CSG combination of objects) without some efficient
> proximity function...
> Could you explain a bit more?
>
Well, I think the real proximity function is in the isosurface code which
I've left essentially unchanged. The Find Root functions have the onerous
task of locating the actual isosurface surface, as it were.
The object function itself simply uses brute force, shooting out rays until
it thinks it has a decent distance to return, which at this point simply
means it has one or more hits. Fortunately as the points get closer to the
object more rays hit and the results get more accurate. I don't pretend at
this point that it's optimal or even slightly efficient; frankly I'm rather
surprised how well it works the way it stands.
That's why I've asked for suggestions on optimizing the method, such as an
efficient proximity function for the general case :-).
Also I can't claim to have tested every possible case, just some relatively
complex CSGs with other object types. But since the code relies mostly on
the Intersection method I believe it should work with most general cases, if
not all.
Hope made sense,
- Jeff
jef### [at] twilightfair com
Post a reply to this message
|
![](/i/fill.gif) |