No. This is how the curveTo is calculated: with the control point. No control point, no curveTo, that’s the way it is. But if you’re not satisfied with it, there’s a very nice curveThrough prototype developped by CCCP.
because isn’t the moveTo command suppose to be x1 and y1?? because controlx and controly are mouse points. This bit is confusing me…
I understand why the formula to get the curve works, but still can’t get my head around to why _xmouse (somethign simple like that) isn’t working :-\ Because if the mouse is on point 50, 50…then the control points should also be on 50, 50. Am i confusing you???
it has nothing to do with the curve formula, it is only for the visual aid of the red line. when looking at the code just look at the robert penner code, not the one I gave you.
the control points are NOT the ‘tip’ of the curve, but the points that the curve is TRYING to reach. if you look at the example, you’ll see that the controlX, controlY coordinate is way above (about half) where the mouse is. imagine the green line being straight and the controlX, controlY as something “pulling” the line into a curve.
here is another one… this time drag the middle dot (this changes the controlX,controlyY) and the other two dots. remember, only use this as a visual aid, don’t look at the code because it will only confuse you more!