Pardon my description of a problem - I am not necessarily a math expert. This could be a very easy problem to solve but I am not good at it at all.
I have a DTM (digital terrain model) that is represented by a regular matrix of points that have (x,y,z). I also have an elevation profile between two points (Pt1, Pt2, both on the XY plane) that is formed by cutting vertically through the DTM - the cutting plane is vertical to the XY plane and is passing through Pt1 and Pt2. This elevation profile represents the undulation of the ground between points Pt1 and Pt2 as series of 3D points in the same coordinate space as the DTM itself. I am able to do this using a commercial GIS software.
Now here's the question. I want to treat these set of points in the elevation profile in their own 2D coordinate system (which is the cutting plane described above) such that the
(1) Pt1 is the origin
(2) Pt1-Pt2 forms the the X axis
(3) Current Z axis (of the 3D coordinate space of DTM) forms the Y axis.
I hope I have been clear to describe this problem. Can someone please suggest how to go about solving this? Thanks!