Ok let me try to ex plane my problem I want to draw a ball with a horizontal line on it. And when I with the mouse courser move over the ball I want to turn the ball and then bend the horizontal line to give the impression of the ball turning.
In the end it should be both a horizontal and a vertical line but the problem is the same for both off them.
My idea is to use a ellipse to draw the ball and use a bezier for the horizontal line but I cant figure out how to calculate the control points to get the impression I want.
The real problem is how to calculate the controller points so I get a nice curve that intersects the mouse pointer when it's inside the ellipse.
See the images below where as I have programmed It now the curve will not intersect the mouse cursor. The mouse cursor is showed as a small ellipse with a point in.
I will use it on my android phone to control a robot and the "ball" I'm trying to draw is one of the controls to behave as an analog stick.
Ok I tried to make something like you proposed and it solved my problem when I move the cursor vertical and horizontal but in between there still are a problem... I need to make some compensation depending on which angle the mouse cursor are relative center of the ellipse.