title: Calculating points on line with endpoints
body: <p>Using Python 2.7.3 and Pygame 1.9.1.</p>
  
  <p>I have a line and I only know the co-ordinates of endpoints A and B.<br>
  I want to calculate what are the co-ordinates AB, given a value on x or y axis.<br>
  <strong>For Example</strong><br>
  <img src="https://i.stack.imgur.com/BGzaO.png" alt="Image Example">  </p>
  
  <p><strong>Here I know</strong><br>
  <code>(x,y)</code> of <code>A</code> <strong>,</strong> <code>B</code>&amp;<code>C</code><br>
  <strong>Also,</strong><br>
  <code>C</code> is on X-axis or Y axis.<br>
  <strong>My Question</strong><br>
  How do I calculate the position of the Co-ordinates(x,y) of point <code>D</code> </p>