Algorithm for limiting a moving point to a 3d surface

I'm not sure where to start looking for information on this, so I'm asking here. Hopefully this is not too general. I wrote a particle library in C ++ and am trying to add the ability to contain particles on the mesh surface. Not a hard constraint, however - I want the particles to be able to slide across the surface when exposed to forces.

So, imagine I have an arbitrary concave mesh with n triangular edges. Then I have a 3D point (particle) positioned on one of the faces. A apply a directional force to this particle to make it move, but I want it to move in the surface topology, not just move linearly in space. It should move smoothly across the surface and always touch the mesh triangle.

I thought about the linear movement of the particle first, and then snapped it to the closest point on the surface, but that would run into a lot of problems, for example, the particle could snap to other non-adjacent parts of the mesh simply because they are at a shorter distance from the particle after moving it by force.

Then I thought about checking its barycentric coordinates and using them to determine which adjacent triangle it should move to if it leaves the boundaries of its current triangle ... but that seems like a very inefficient solution riddled with other problems (like if force moves the particle outside of all adjacent triangles).

Then I thought about using the UVW coordinates to figure out where the particle would go, but that wouldn't work either.

Any ideas?

Here's an image to help illustrate the problem:

enter image description here

+3
c ++ 3d mesh surface particles


source to share


No one has answered this question yet

Check out similar questions:

1564
What are move semantics?
1518
Image processing: improvement of the algorithm for the recognition of "Coca-Cola Can"
950
Undefined behavior and sequence points
4
Three.js - morph geometry and refinement of triangular meshes
2
how to get a correct triangular cladding in a double path
2
Partitioning a 3D surface in MATLAB
1
Fortran - point in STL
1
Surface mesh (triangulation) from precise points on the pipe surface
1
How can I find a triangle containing a point on a sphere from a triangular mesh of a sphere in CGAL or qhull?
0
How do I use CGAL to model a set of points moving around a sphere?



All Articles
Loading...
X
Show
Funny
Dev
Pics