title: Relative position of a point within a quadrilateral
body: <p>I am trying to find the easiest way to determine a relative position of a point within a quadrilateral. The known are (see figure) the positions of points 1, 2, 3, 4 and 5 in the xy-coordinate system: x1, y1, x2, y2, x3, y3, x4, y4, x5, y5.</p>
  
  <p><img src="https://i.stack.imgur.com/6iJR1.png" alt="enter image description here"></p>
  
  <p>Also known are the positions of points 1, 2, 3, and 4 in the &xi;-&eta; coordinate systems (see figure).</p>
  
  <p>From this data, I want to determine what are the &xi; and &eta; for point 5. </p>
  
  <p><strong>Results</strong></p>
  
  <p>Thank you to all who anwsered! I find the solution by @dbc and @agentp similar. Also I find this solution better than the perspective transformation solution by @MBo, since I do not have to compute the inverse of a matrix (Ax=B --> x=inv(A)*B).</p>
  
  <p>I get the following result for:</p>
  
  <pre><code>u = 0.5 * (ξ + 1)
  v = 0.5 * (η + 1)
  </code></pre>
  
  <p>In my case all points are within the rectangle, therefore u>0 and v>0.</p>
  
  <p><img src="https://i.stack.imgur.com/p1Lvm.png" alt="enter image description here"></p>