Drawing beziers with mouse

Hi!

Have been playing a bit with beziers lately, drawing them in 2D and 3D. As my math skills really arent all that, some questions occur from time to time.

Problem: I want to draw a bezier with the mouse, but Im having a hard time trying to calculate the control point. I use a MouseMotionListener, and while drawing the bezier, I store all the drawn coordinates in an ArrayList in the mouseDragged() method. So, I know the start and end point of the bezier, but I have to calculate the control point(s) using the newly created ArrayList of coordinates. Ive been googling around for a possible solution, but Im not able to find anything concrete. I was wondering if somebody has got some hints for this?

Thank you!

Use Natural cubic splines or Catmull-Rom splines instead. They got the property that curve goes threw the controll points.

http://www.cse.unsw.edu.au/~lambert/splines/