Box100-Axo-1to1-Orto.mws

>    with(linalg):

The matrix extracted out of the picture:

>    M:=array(1..4,1..4,[ [ 0.004216,  0.010552,  0.002056, -0.841142 ],
                     [-0.004686, -0.000183,  0.010552, -0.284094 ],
                     [-0.010405,  0.005040, -0.004534,  0.493913 ],
                     [ 0.0     ,  1.0     ,  0.0     ,  1.0      ]]);

M := matrix([[.4216e-2, .10552e-1, .2056e-2, -.841142], [-.4686e-2, -.183e-3, .10552e-1, -.284094], [-.10405e-1, .5040e-2, -.4534e-2, .493913], [0., 1.0, 0., 1.0]])

Here the With  and Height  of the Picture:

>    w,h := (1024,1024);

w, h := 1024, 1024

The point coordinates of the location you search in the picture:

>    px,py,pz := (0.0, 0.0, 0.0);

px, py, pz := 0., 0., 0.

The matrix multiplication:

>    Q := multiply(M,array(1..4,[px, py, pz, 1]));

Q := vector([-.841142, -.284094, .493913, 1.0])

>    k := min(w,h);

k := 1024

>    S:= multiply( array(1..3,1..3,[[k,0 ,w  ],
                               [0,-k,h  ],
                               [0, 0,1.0]]), array(1..3,[Q[1]/Q[4], Q[2]/Q[4], 1]) );

S := vector([162.6705920, 1314.912256, 1.0])

>    x := S[1] * 0.5;

>    y := S[2] * 0.5;

x := 81.33529600

y := 657.4561280

>    px,py,pz := (0.0, 0.0, 100.0);

px, py, pz := 0., 0., 100.0

The matrix multiplication:

>    Q := multiply(M,array(1..4,[px, py, pz, 1]));

Q := vector([-.6355420, .7711060, .405130e-1, 1.0])

>    k := min(w,h);

k := 1024

>    S:= multiply( array(1..3,1..3,[[k,0 ,w  ],
                               [0,-k,h  ],
                               [0, 0,1.0]]), array(1..3,[Q[1]/Q[4], Q[2]/Q[4], 1]) );

S := vector([373.2049920, 234.3874560, 1.0])

>    x := S[1] * 0.5;

x := 186.6024960

>    y := S[2] * 0.5;

y := 117.1937280

>