3 removed unnecessary tag
| link
2 If it's longer in one direction than in the other, it's not a circle, it's an ellipse.
source | link

Work out the point on a circlean ellipse given centre, radius, and direction vector?

I have a vector (white line), a centre and a radius along each of the semi-major and semi-minor axes of an ellipse (green line). I need to find the point where the white line intersects the green.

I have tried to work it out using Atan2, Sin and Cos but that doesn't quite work (blue line). It works when parallel to an axis but doesn't otherwise, I have a feeling this is because I am trying to perform the calculation on a rectanglean ellipse where the horizontal and vertical radii are different.

Vector2 delta = (screenPos - canvasCentre).normalized;
float angle = Mathf.Atan2(delta.y, delta.x);
Vector2 position = canvasCentre + new Vector2(
                Mathf.Cos(angle) * radius.x,
                Mathf.Sin(angle) * radius.y);

enter image description here

Work out the point on a circle given centre, radius, and direction vector?

I have a vector (white line), a centre and a radius (green line). I need to find the point where the white line intersects the green.

I have tried to work it out using Atan2, Sin and Cos but that doesn't quite work (blue line). It works when parallel to an axis but doesn't otherwise, I have a feeling this is because I am trying to perform the calculation on a rectangle.

Vector2 delta = (screenPos - canvasCentre).normalized;
float angle = Mathf.Atan2(delta.y, delta.x);
Vector2 position = canvasCentre + new Vector2(
                Mathf.Cos(angle) * radius.x,
                Mathf.Sin(angle) * radius.y);

enter image description here

Work out the point on an ellipse given centre, radius, and direction vector?

I have a vector (white line), a centre and a radius along each of the semi-major and semi-minor axes of an ellipse (green line). I need to find the point where the white line intersects the green.

I have tried to work it out using Atan2, Sin and Cos but that doesn't quite work (blue line). It works when parallel to an axis but doesn't otherwise, I have a feeling this is because I am trying to perform the calculation on an ellipse where the horizontal and vertical radii are different.

Vector2 delta = (screenPos - canvasCentre).normalized;
float angle = Mathf.Atan2(delta.y, delta.x);
Vector2 position = canvasCentre + new Vector2(
                Mathf.Cos(angle) * radius.x,
                Mathf.Sin(angle) * radius.y);

enter image description here

1
source | link

Work out the point on a circle given centre, radius, and direction vector?

I have a vector (white line), a centre and a radius (green line). I need to find the point where the white line intersects the green.

I have tried to work it out using Atan2, Sin and Cos but that doesn't quite work (blue line). It works when parallel to an axis but doesn't otherwise, I have a feeling this is because I am trying to perform the calculation on a rectangle.

Vector2 delta = (screenPos - canvasCentre).normalized;
float angle = Mathf.Atan2(delta.y, delta.x);
Vector2 position = canvasCentre + new Vector2(
                Mathf.Cos(angle) * radius.x,
                Mathf.Sin(angle) * radius.y);

enter image description here