|
|
I'm a little stuck on my wave-system. What I'd
need is an algorithm which takes an object, like
a sphere, and maps it onto a two-dimensional array
of points, to find which points the sphere hits.
The problem is, I'd want the algorithm to do this
for ANY shape, even ones without well-defined
insides (like meshes).
I've thought of several approaches so far, and the best
yet would probably be to shoot one ray from the center
of the object onto the waterplane, and then successively
move outward in order to find the most-outward points
that are hit by the object.
But how to begin that? The plane isn't necessarily
aligned to an axis, so I need a way to "ping" the nearest
point of the array to the position the ray has hit.
Any suggestions?
I've begun looking for "nearest neighbour", but until now
I've only found the "travelling salesman problem", which
is not what I'm looking for.
Any help would be appreciated,
Tim
--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde
Post a reply to this message
|
|