MDC-ELLIPSOIDs is a MATLAB® code to calculate the minimum distance between two ellipsoidal surfaces in a non-conformal contact situation. The implemented methodology is specifically designed for rigid contact detection where the surfaces are in a convex-convex interaction and do not deform or alter there local geometric properties whenever there is contact.
Minimum distance calculation is performed by numerically solving a system on non-linear equations with the Newton-Raphson method with analytical Jacobians. The system of non-linear equations corresponds to a set of necessary, although not sufficient, geometric constraints whose solution consists of the pair of points that have a common normal direction. To restrict the solution space to a unique pair of points, different types of constraints are considered: collinear constraint (vector cross-product); orthogonal constraint (vector inner-product); and locus constraint (point belongs to surface). To guarantee unicity, an additional non-equality condition, that evaluates the distances of all the candidate solutions, is considered. All constraints have a well-defined analytical expression that relate the geometric entities envolved in the common normal concept, i.e., the normal, tangent, binormal and distance vectors which are deducible given only the implicit surface functional.
Householder transformation proved to be useful to deduce the tangential and binormal vectors given the analytical expression of the normal vector which, by vector calculus, is derived as the gradient of the implicit function.
Proximity queries were also implemented to test for coarse (with the traditional bounding spheres) and narrow (with the separate condition) contact detection. Note that the proximity queries do not calculate the minimum distance between ellipsoids.