I need to clamp a 2D coordinate to fit within an ellipse.
Call of Duty: Modern Warfare 2 does something similar where capture points are translated from a 3D vector in the world to a 2D screen coordinate and then the 2D coordinates are clamped within an ellipse.
When the capture points are in view they're within the bounds of the ellipse.
When they're behind you they are clamped to be within the bounds of the ellipse.
Given a 2D coordinate that could be off screen, etc, what is the math behind clamping it within an ellipse?