|
![](/i/fill.gif) |
Stephen Waelder <wae### [at] wf net> wrote:
> I want to define limits for object interaction. Instead of having one
> object pass into and through another, I want to have either the smaller
> object leave a hole in the larger, or for the two objects bounce off
> each other.
>
> Concepts that I'm thinking of include animating wind blowing trees.
> Branches should not pass through each other, while loose leaves should
> not pass through the trees.
Hi!
Actually I think what you are describing is a *very* difficult problem,
from a mathematical point of view. Since objects can be described by at
least a fourth grade polynomial, you are asking for the solution space
of two fourth grade polynomials *or worse*.
With that said we can be satisfied with a heuristic algorithm for your
problem, such as just throwing away a couple of rays from the center of
one of the objects and see if they hit the intersection of the two
objects (which actually is a simple problem to solve). Now one way to
implement this would be to hardcode it into povray. Or better yet, we
can add a function to povray which allows one to get the next
intersection of a specified ray with a set of objects. The later
solution would be preferable since it could be used for a lot of things
(if think it have been suggested before in povray.programming).
Does anyone feel the surge to implement this and to specify a nice
syntax for it? (And while your at it, why not throw in a function to
get the gradient at a specified point for a given object...)
/ Mathias B.
Post a reply to this message
|
![](/i/fill.gif) |