Sign in to follow this  
chrome68

inner object detection algorithm

Recommended Posts

I'm working with a mass-spring system, so i have a set of nodes (x,y,z) defined as a surface. For simplicity lets say i deal with a spherical surface (of say 5cm radius). Within that i create a smaller sphere defined with much fewer nodes (of say 1cm radius). So essentially i have an object with another defined inside it. The outer sphere is a deformable mass-spring surface like a soft body simulation. The inner sphere can be located anywhere within the larger sphere. On the outer surface i can interact with ONE point, deform it, and generate the appropriate feedback forces at that point,which is a result of the applied force by the mass-spring equations. Now if i consider the smaller inner sphere (whose stiffness is much much higher than that of the surface sphere, almost like a hard lump in tissue), if this lies somewhere underneath there will be a 'stiffer' force feedback experienced at the ONE point interacted with on the outer sphere. For now i am not concerned at how this force is determined, i may post about this later. I am thinking about HOW MUCH of the inner sphere influences this force. This obviously depends on the position of the inner sphere and the the direction vector of the force applied on the surface. For instance if i shoot a ray (as the force vector) through the ONE point on the surface that i interact with, i could completely miss the inner sphere or just clip it, or hit it dead on. These could reflect back and hit the outer sphere again, in which case force would need to be accumulated. 2 Questions: 1) I would like some advice about what area i am researching here (hopelessly lost), because the way i see it is that: the two spheres are defined as two sets of nodes but they NEVER NEVER intersect or meet (like a lump in tissue), so am i looking at collision detection? 2) How would i go about shooting rays or multiple rays then have them reflected off the inner sphere (if this is a good idea at all???) to find if i'm 'hitting' the inner sphere from the surface? 2.5)Is this a slow process (needs to be real time)? The mass-spring system is written in C++ using OpenGL for visualization, so contains classes for mass, position, spring stiffness etc... The whole interaction and deformation and calculation needs to be in real-time Any help on defining the area i'm researching would be really helpful too :)

Share this post


Link to post
Share on other sites
I'd say you are best off with an approach like the fast latice spring system linked in your last topic, where in you could just tighten some springs in the latice to simulate your hard node. Expecially since the force depends not only on the direction of the force, the normal of the impact, but also how much room there is for the inner sphere to stretch around. Ie something at the center is going to be able to move around a bit more than something bound near the surface of your outer sphere.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this