Hello flash peeps,
I'm a dunce when it comes to maths and I have a problem I need help with. I doubt it's especially hard but it's too much for my feeble brain so I'd appreciate any help.
I need to join two points with a line. Easy enough if it's a straight line, but I need the line to have a slight curve. I know how to use curveTo, what I don't know is how to calculate the position of the 'control point' that dictates the shape of the curve.
So here's my (theoretical) code:
start_point = {
x:0,
y:0
};
end_point = {
x:100,
y:100
};
control_point = {
x:???,
y:???
};
line.moveTo(start_point.x, start_point.y);
line.curveTo(control_point.x , control_point.y, end_point.x, end_point.y);
I need some mathematical gubbins to calculate where to place control_point.
Thanks in advance for any help.