Matlab: Punkt auf ellipsoidalen Oberflächen
( German ) This post is focussing on the solution of calculating a point of an ellipsoidal surface in dependency of to angles like in spherical coordinates. Mode of operation: This function calculates the closest point on an ellipsoidal surface from an point outside or inside the body in respect to its center. It needs the mesh data of the ellipsoidal body X, Y, Z and the point, where the point with direct connection to the center should be found on the surface. The output parameters are [point, phi, the] = PointOnSurfaceAnalytic(X, Y, Z, x, y, z); the surface point and the angles phi and theta of the ellipsoidal equations. It can be downloaded here . To derive the formula we start with the ellipsoidal equation: (x/ a)^2 + (y/ b)^2 + (z/ c)^2 = 1 If we consider 𝝋 to be between the x and y axis and 𝝑 be between the y and z axis it leads to: x = y/tan 𝝋 z = y/tan 𝝑 Substitute this in the ellipsoidal equation one g...