Reputation: 91
I've a set of triangles creating a mesh along the same plane (think about a wall of a room with its triangle defining the geometry). I need to show a 2D representation of the mesh so that every point of each triangles (x, y, z) is trasformed to (x, y). I need to have the same exactly shape/area of each triangle, placed at the same relative locations of the other triangles.
There are already answers like this that solve how to transform a 3D triangle into 2D like this
but they need to set one vertex of the triangle as the origin. How can i apply the same idea so i don't need to put each triangle at the right position compared to the other triangles?
Upvotes: 0
Views: 1468
Reputation: 137188
You can use the same approach. Just pick one point (the first vertex of the first triangle is as good as any) as the origin and use that same value for all the points in your mesh.
This should transform them in a consistent manner.
Upvotes: 1