# Normalised 2D coordinates on a surface

## Homework Statement

I'm trying to find normalised 2D coordinates for a point (Px,Py,Pz) that lies on a planar surface, which is defined by straight lines between 4 points c1-c4 (numbered anticlockwise).

## Homework Equations

General vector equations

## The Attempt at a Solution

Suppose the point c1 is in the bottom left corner. The horizontal lines bounding the top and bottom of the surface are i) from c1 to c2 and ii) from c4 to c3. A normalised x-coordinate creates a pair of points (M,N) that are an equal proportion along both lines. M and N are chosen such that a a line from M to N passes through P. A similar y-coordinate is used to locate the point vertically.

The diagram below shows an example, with (normally unknown) normalised coordinates (0.8,0.5)

to find the normalised coordinates:

Suppose A is the normalised x-coordinate

Mx=A(c2x-c1x)
My=A(c2y-c1y)
Mz=A(c2z-c1z)
Nx=A(c3x-c4x)
Ny=A(c3y-c4y)
Nz=A(c3z-c4z)

A line from M to N must have the same unit vector as a line from M to P

(Nx-Mx)/((Nx-Mx)^2+(Ny-My)^2+(Nz-Mz)^2)^.5)=(Px-Mx)/((Px-Mx)^2+(Py-My)^2+(Pz-Mz)^2)^.5)

and similar for (Ny-My) and (Nz-Mz)

I now have the following problem

i) The equation above does not seem to be able to generate a closed form expression for A
ii) A appears to cancel in the LHS of the equation above (given that 0<A<1, so it can be taken out of the square root). This suggests that the unit vector is independent of the normalised x-coordinate, which doesn't seem to be correct.

Can anybody help with this? or think of a better method?

Cheers

Mat

#### Attachments

• Untitled.jpg
22.2 KB · Views: 335