title: Move an object on on a Bézier curve path
body: <p>I want to move my image on a Bézier curve path from top to bottom but I can't get how can I calculate x/y points and slope from this path. The path looks like the following image:</p>
  
  <p><img src="https://i.stack.imgur.com/UtiHe.png" alt="A line that curves slightly to the right as it goes down the page."></p>
  
  <p>I have start points, end points and two control points.</p>
  
  <pre><code>Path path = new Path(); 
  Point s = new Point(150, 5); 
  Point cp1 = new Point(140, 125); 
  Point cp2 = new Point(145, 150); 
  Point e = new Point(200, 250); 
  path.moveTo(s.x, s.y); 
  path.cubicTo(cp1.x, cp1.y, cp2.x, cp2.y, e.x, e.y); 
  </code></pre>