# Find duplicate Geometry with Linear Transform

#### theHeavyLobster

Hey,

I'm working on an algorithm that finds duplicate Geometry. Here's what I do: I'll take a mesh, get all it's vertices and find the average of them:

x = average(a, b, c, d, e, f)

then I'll get the distances of the average to the vertices:

bd = dist(x, b)
cd = dist(x, c)
dd = dist(x, d)

and now I'm sorting them and remove duplicates. so far so good, it works and is pretty stable, this list I can compare to other lists to find duplicate geometry, I'll just use 3 entrys of these lists to compare, as it's a lot faster though.

THE QUESTION:

I want to also find sets of the same base-geometry that were simply transformed linearly, see the picture attached:

here you'll see three potatoes from left to right. the first two are based on the same mesh, I've only linearly transformed them, the third one is a different mesh, or non-linear transform. Is there any way that I can find geometry that has had the same base?

The graphs above the geometries are the distances from their averages, without duplicates and sorted.

Any help is appreciated

#### Attachments

• 13.3 KB Views: 2

#### theHeavyLobster

Or another question that would help me a lot:

If I apply a random linear transform on an object, is there anything that stays constant? The more constants there are, the more of a base I have to operate upon.

- I know the vertice-count, that helps to determine duplicates.

- The distance of the closest vertice to the average is not reliable, the closest vertex might change due to the transform.

If I knew the bounding box of the original, that would solve everything, because that is the basis that I use for the transform (scaling, moving, rotating), but I don't, and don't know how to get it.

Getting a bounding box that stays relative to the vertices on every linear transform, can I get that somehow?