i made a ellipsoid with this function [X,Y,Z] = ellipsoid(xc,yc,zc,xr,yr,zr) and with function (rotate) i rotated with certain angel.
after rotation the ellipsoid , how can we check if a given point with its coordinante(x,y,z) is inside of ellipsoid.
If ellipsoid is oriented in main axes (not rotated) we can use the equation from ellipsoid also :
(x/a)2 + (y/b)2 + (z/c)2 < 1 point is inside ellipsoid
(x/a)2 + (y/b)2 + (z/c)2 > 1 point is not inside ellipsoid
but how can we check if the point is inside when ellipsoid is rotated? in this case are all point of ellipsoid rotated and we can not use upper equation anymore , right?
Best Answer