Triangular Meshes

Approximate any surface to a mathematical model made of triangles. Useful for creating simulations and VR-models.

How to create a triangular mesh from a real world object

  1. Scan the object
  2. Obtain from the scan a cloud of points
  3. Using the points from the cloud of points create the triangular mesh

Why is it a triangular mesh?

  • Because 3 is the minimum number of points needed to create a plane.

Each triangle has its own normal

  • Calculating the normal of a plane is useful for the calculations of the optimal contact point of the robot.
~Ex.: Cloud of points Triangular mesh


Bounding Box

Let’s define the shape of our triangles with equations: (Triangles equations are planes equations)

We can define being in an object if we are inside the bounding box, then we can say that we are “touching” that object.

We are in the bounding box if our current position respects all the inequalities:

(this is not entirely true, for just touch it should be , and for penetration but having it exactly equal to 0 is impossible).

The touching simulation and prevision is really good if the mesh has a lot of points (better approximation), but more points also mean more delay.


Interpolation

For each triangle in our triangular mesh there is only one normal, to solve thins, we can then make an interpolation: So the normal now becomes a smooth function (always depending on the position), before as we can see in the figure we have that the normal is constant for each triangle so we have a non-smooth transition when we pass from one triangle to another.

When we have fewer points then we can take the interpolation: Where:

Considering:

  • Distance between and as:
  • Distance between and as:
  • Distance between and as:

All of them positive (distances cannot be negative)

Generally we have:

Considering now 3 points (for a triangle): , with their respective normals:

The interpolated normal of can be calculated as:


How to select a sample triangle?

  • OCTATREE method.

Given 8 points create a 3D object (parallelepiped) Creating 6 planes that you can play with.

SEARCH FOR OCTATREE METHOD