4

I have a set of 3D points of a mesh and normals at each point. Points lie on the same plane which are obtained from cutting a 3d model along an arbitrary plane.

The problem is - I need to map these 3D points to their planar 2d coordinates (u,v), that can be used to form Delaunay triangulation of the mesh. So I need a transformation matrix that transforms these 3d coplanar points to their planar 2D coordinates.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Nidhi
  • 43
  • 5
  • I don't know why you need a matrix since in your case it's a simple projection. If you're using C++, the CGAL library has an example of how to do a 2D triangulation how of 3D coplanar points [here](http://doc.cgal.org/latest/Triangulation_2/index.html#title14). – sloriot Feb 03 '15 at 08:07
  • Actually I am using "Triangle" library for triangulation, that needs 2D coordinates. Thats why I need to transform the points to local 2D points. – Nidhi Feb 03 '15 at 08:13
  • 1
    Then just use u=y and v=z – sloriot Feb 03 '15 at 10:06
  • If I have a set of 3D points obtained after cutting a 3D model along some arbitrary plane, then what would be the transformation ? As this time we have different coordinates for all the points, we just cannot ignore any of the (x,y,z) coordinate. – Nidhi Feb 03 '15 at 11:29
  • Update your question then. Your are writing "a plane perpendicular to x-axis" – sloriot Feb 03 '15 at 15:03
  • possible duplicate of [Projecting 3D points to 2D plane](http://stackoverflow.com/questions/23472048/projecting-3d-points-to-2d-plane) – John Alexiou Feb 03 '15 at 17:10

1 Answers1

1

The simple solution would be to define a plane perpendicular at all points to your normal vectors. In that case, you simply let the Z component of each vector to the point on your surface equal 0 giving you a two-dimensional representation of your surface on the defined plane. Your transformation (or properly rotation) matrix is then defined with respect to the plane.

The details of the approach are given at plane (Geometry) and the nuts and bolts of how to do it are shown at Defining a plane in R3 with a point and normal vector.

David C. Rankin
  • 81,885
  • 6
  • 58
  • 85