title: Simple 2D Plane Trajectory with Bezier Curve
body: <p>Hello and Happy New Year !</p>
  
  <p>Let me begin with the strict facts instead of writing the whole scenario here.</p>
  
  <p><img src="https://i.stack.imgur.com/RYzsc.jpg" alt="enter image description here"></p>
  
  <p><strong>This is what i have</strong>:</p>
  
  <ul>
  <li>A plane in 2D Space (X,Y)</li>
  <li>A destination this plane has to fly to in 2D space (X,Y)</li>
  <li>A bezier curve class that generates the bezier from 4 points (A,B,C,D)</li>
  </ul>
  
  <p><strong>This is what i need to do</strong>:</p>
  
  <ul>
  <li>When user clicks on the space in X', Y' i need to generate a bezier curve
  for this plane to fly there.</li>
  </ul>
  
  <p><strong>These are some assumptions</strong>:</p>
  
  <ul>
  <li>It is known that plane can't rotate in one place, it has to make some minimal turn</li>
  <li><p>It is known that when destination is in front of the plane it doesn't make any turn</p></li>
  <li><p>Bezier curve has to be calculated from 4 points where</p></li>
  <li>point A = actual plane position</li>
  <li>point B = actual plane position + actual plane direction * 2 (so it goes forward a bit ? )</li>
  <li>point C = needs to be calculated</li>
  <li>point D = plane destination</li>
  </ul>
  
  <p>Here are few of those scenarios drawn:</p>
  
  <p><img src="https://i.stack.imgur.com/ZDAe4.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/zoVrl.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/JxBex.jpg" alt="enter image description here"></p>
  
  <p><strong>Question</strong>:</p>
  
  <ul>
  <li><p>How do i calculate this bezier curve, i already have point A,D but i need those B,C to make this turn proper.</p></li>
  <li><p>How can i characterize this bezier so that let's say planeA has smaller turns than planeB ?</p></li>
  </ul>
  
  <p>I almost had it, but almost is nothing in this case so i better rewrite this with your help.</p>
  
  <p>Thanks for any help with this, i am scratching my head with this and found it's not that easy i was thinking... or ? </p>