Normalize vector according to ellipse

238 Views Asked by At

I have an ellipse (of width $w$ and height $h$) centered in $c$ and a vector $v$ (whose origin is $c$).

enter image description here

$v$ can cross the ellipse or not. My objective is to find out the point where $v$ touches (or would touch) the ellipse if it was at least big enough to touch it.

enter image description here

1

There are 1 best solutions below

0
On

$$\frac{v_y}{v_x}=\frac{h\sin\theta}{w\cos\theta}$$ gives

$$\tan\theta=\frac{v_yw}{v_xh}.$$

So $$h\sin\theta=\frac{v_ywh}{\sqrt{v_y^2w^2+v_x^2h^2}}, \\w\cos\theta=\frac{v_xwh}{\sqrt{v_y^2w^2+v_x^2h^2}}.$$