Here, d is the shortest distance between the source end and the destination plane,
rs is the radius of the source cylinder,
ec is the direction vector from source end to the contact point on destination plane and
es is the direction vector of the source axis.
The shortest distance between the source and the planar destination (d) is the projection of the distance between source end point and a point on the plane in the surface normal direction. It is calculated as
Here, Xse and
Xdst are the undeformed locations of the source end and a point on the destination plane, and
use and
udst are the corresponding displacements.
nd is the surface normal of the destination plane.