## finding a 2d points position in 3d space

### finding a 2d points position in 3d space

ive got 3 points i know whose positions before and after theyve benn multiplied by a matrix
eg
(5,2,0) *M = (12,4,12)

how do i find out what the matrix is?

cheers zed

### finding a 2d points position in 3d space

If you have three points you can establish three equations in three unknown.
If there are P0, P1, P2 and Matrix M_i,j and the resulting points R0, R1, R2 you can write the
following (# means all indices):

(a1.)    P0*M_#,0 = R0_0        (b1.)    P1*M_#,0=R1_0        (c1.)    P2*M_#,0=R2_0
(a2.)    P0*M_#,1 = R0_1        (b2.)    P1*M_#,1=R1_1        (c2.)    P2*M_#,1=R2_1
(a3.)    P0*M_#,2 = R0_2        (b3.)    P1*M_#,2=R1_2        (c3.)    P2*M_#,2=R2_2

These are in total 9 equations in 9 unknown. You may want to take equns a1. to c1. in order to
solve for the elements of the first column of the matrix with an ordinary 3x3 equation solver.
The same holds for the a block i.o. to solve for the first row.

Gerd

> ive got 3 points i know whose positions before and after theyve benn multiplied by a matrix
> eg
> (5,2,0) *M = (12,4,12)

> how do i find out what the matrix is?

> cheers zed

Hi

I'm a newbie to all this, so I hoping someone can point in the right
direction. I have a rectangular region (R) that lies in a 3D
coordinate system.

I have the location of the upper left hand corner of R, point
P(a,b,c).
I also have six directional cosines. One set of three (dcx1,dcy1,dcy1)
pertain to one vector V1, that originates from P.  The other set of
three (dcx2, dcy2, dcz2) pertain to the vector V2, that orignates from
P and is perpendicular to V1.  V1 and V2 from the boundaries of one
corner of the region R.

V1
P-----------------|
|         X       |
V2 |                 |
|-----------------|

Given a 2D point X (x1,x2) in the local space of the region R, I want
to determine its location in the 3D global space.

I came up with the following

M =   |dcx1, dcx2,0,a  |
|dcy1, dcy2,0,b  |
|dcz1, dcz2,0,c  |

3DPoint = M * [x1,x2,0,1]

Is this correct?

Also how what would I have to do to go the other way?  That is, given
a 3D point that I know is on R, I have to determine a 2D point in the
space of the region.

Thanks!