title: Given f(x) linear function, how to obtain a Quadratic Bezier control point
body: <p>I've been doing a lot of research on the topic and found a couple of post that where helpful but I just can't get this right.</p>
  
  <p>I am developing a very simple structural analysis app. In this app I need to display a graph showing the internal stress of the beam. The graph is obtained by the formula:</p>
  
  <pre><code>y = (100 * X / 2) * (L - X)
  </code></pre>
  
  <p>where <code>L</code> is the known length of the beam (lets say its 1 for simplicity). And <code>X</code> is a value between 0 and the Length of be beam. So the final formula would be:</p>
  
  <pre><code>y = (100 * X / 2) * (1 - x) where  0 &lt; X &lt; 1.
  </code></pre>
  
  <p>Assuming my start and end points are <code>P0 = (0,0)</code> and <code>P2 = (1,0)</code>. How can I obtain <code>P2</code> (control point)?? I have been searching in the Wikipedia page but I am unsure how to obtain the control point from the quadratic bezier curve formula:</p>
  
  <pre><code>B(t) = (1 - t)^2 * P0 + 2*(1 - t)*t * P1 + t^2 * P2
  </code></pre>
  
  <p>I'm sure it must be such an easy problem to fix… Can anyone help me out?</p>
  
  <p>P.S.: I also found this, <a href="https://stackoverflow.com/questions/1853637/how-to-find-the-mathematical-function-defining-a-bezier-curve">How to find the mathematical function defining a bezier curve</a>, which seems to explain how to do the opposite of what I am trying to achieve. I just can't figure out how to turn it around.</p>