# How to check if a surface normal faces inwards or outwards an ellipsoid?

I have a half ellipsoid parametrised by $$a,b,c,\theta,\phi$$ and centered at origin. I have an optimization problem where I estimate the three components of a 3D direction vector $$\hat{d}=(x,y,z)$$ where, $$-1\leq x,y,z\leq 1$$. Assume the estimated vector is normalized. Is it possible to know if this estimated direction vector points towards the inside or outside the ellipsoid with only this information? If yes, how? The origin of the direction vector always lies on the surface of the ellipsoid.

• $\vec{OP}\cdot\hat d>0$ if $\hat d$ points outwards. Commented Oct 11, 2022 at 16:14
• I assume O is the origin and P is the position of $\hat{d}$, is that right? Commented Oct 12, 2022 at 5:59
• That works. I could also verify it through visualizations. Thank you. But I am afraid I do not know how to mark the comment as the answer to the question. Commented Oct 12, 2022 at 6:31
• If you want you can write an answer yourself. Glad I was of help. Commented Oct 12, 2022 at 7:09

As answered by @intelligenti pauca, if the origin of the direction vector on the ellipsoid's surface is $$P$$, then $$\overrightarrow{OP} \cdot \hat{d} > 0$$ if $$\hat{d}$$ points outwards.