title: y coordinate for a given x cubic bezier
body: <p>This question is very similar to: <a href="https://stackoverflow.com/questions/2549706/">Quadratic bezier curve: Y coordinate for a given X?</a>. But this one is cubic...</p>
  
  <p>I'm using the <a href="http://13thparallel.com/archive/bezier-curves/" rel="nofollow noreferrer">getBezier</a> function to calculate the Y coordinates of a bezier curve. The bezier curve starts always at (0,0) and ends always at (1,1).</p>
  
  <p>I know the X value, so I tried to insert it as percent (I'm a moron). But that didn't work, obviously. Could you provide a solution? It's necessary it's an idiot proof function. Like:</p>
  
  <pre><code>function yFromX (c2x,c2y,c3x,c3y) { //c1 = (0,0) and c4 = (1,1), domainc2 and domainc3 = [0,1]
      //your magic
      return y;
  }
  </code></pre>