title: How to calculate the vertex of a parabola given three points
body: <p>I have three X/Y points that form a parabola. I simply need to calculate what the vertex of the parabola is that goes through these three points. Preferably a quick way as I have to do a LOT of these calculations!</p>
  
  <p>The "Ask A Scientist" website provides <a href="http://www.newton.dep.anl.gov/askasci/math99/math99028.htm" rel="noreferrer">this answer</a>:</p>
  
  <blockquote>
    <p>The general form of a parabola is given by the equation: A * x^2 + B * x + C = y where A, B, and C are arbitrary Real constants. You have three pairs of points that are (x,y) ordered pairs. Substitute the x and y values of each point into the equation for a parabola. You will get three LINEAR equations in three unknowns, the three constants. You can then easily solve this system of three equations for the values of A, B, and C, and you'll have the equation of the parabola that intersects your 3 points. The vertex is where the first derivative is 0, a little algebra gives: ( -B/2A , C - B^2/4A ) for the vertex.</p>
  </blockquote>
  
  <p>It would be nice to see actual code that does this calculation in C# or C++. Anybody?</p>