title: AS3 - geometry - perspective projection of a point on a 2D plane
body: <p>I'm currently struggling on a problem that seems far beyond my maths capacities (been a long time since I've made some proper maths...) and I would appreciate some help on that.</p>
  
  <p>Here's my setting :
  I got some simple shapes (rectangles), and I "project" their bottom points on a line, coming from an Origin point.
  Up to this point everything is fine.
  But now I'd like to draw the original shape distorted as if it was projected with some perspective on a plane.</p>
  
  <p>Please consider that I have nothing related to any rotation, isometric or any 3D or fake 2D perspective in my code, I'm only trying to draw some shapes using the graphics library to only have a <em>feeling</em> of something real.</p>
  
  <p>Here's a quick drawing of what I'm trying to do :</p>
  
  <p><img src="https://i.stack.imgur.com/1lKYp.jpg" alt="enter image description here"></p>
  
  <p><strong>What I know :</strong> </p>
  
  <ul>
  <li>Origin point coordinates</li>
  <li>the rect position &amp; sizes</li>
  <li>the red line position</li>
  <li>the A &amp; B points coordinates</li>
  </ul>
  
  <p><strong>What I want to determine is the coordinates of the C &amp; D points</strong>, thing that could be easy if I wasn't struggling to find the "Origin bis" coordinates.</p>
  
  <p>What I'm trying to do is to fake the projection of my rectangle on something that can be considered as a "floor" (related to the plane where my original rectangle is that can be seen as a wall).</p>
  
  <p><em>Maybe I'm over-complicating the problem or maybe I fail to see any other easier way to do it, but I'm really not good anymore in any geometry or maths thing... :-(</em></p>
  
  <p>Thanks a lot for your answers !</p>