- Home /
Tranposing two 3D coordinates onto a 2D plane?
I have two 3D coordinates, say (0,5,2) and (1,2,3).
From those two I want to sort of 'rotate' them around until both their z planes are 0, thus they become (x,y,0),(a,b,0).
What I'm thinking should be done is that I would get the direction vector between the two 3D points (1,2,3)-(0,5,2) = (x,y,z), then I'll rotate that direction vector that will make it become (0,1,0) and using the difference in that rotation rotate the original vectors.
But I have next to no idea and i'm not even sure how I could do it the way I outlined above.
Does anyone have any ideas how I can do this?
Answer by Berenger · May 26, 2012 at 04:43 AM
Why not projecting those coordinates on the plane (x0y), or said otherwise (0,5,2) and (1,2,3) becomes (0,5,0) and (1,2,0).
If this doesn't fit what you want, tell me and I'll move my answer into comments.
But in such cases what if the coordinates are (0,0,5) and (0,0,9)? If I just remove the z component they will become (0,0,0) and it will appear there is no difference between them. Like ideally if the coordinates are (0,0,1) and (0,0,0) when I project them to a 2D plane they become (1,0,0) and (0,0,0) assu$$anonymous$$g (0,0,0) is the pivot point.
Two points in a 3D space belongs to an infinity of planes. As if, in that picture, every pannels are a plane and the vector going through those two points is the rotation axis, but there is an infinity of planes in between as well.
$$anonymous$$y point is that your two points are already on a plane. But if you want a particular plane, z = 0 in that case, you'll have to project them onto it. The orthogonal projection is the simplest, where you ignore z. Using a rotation does seems a bit strange though.