Let's say I have a cylinder centered along the z-axis (center of cylinder is {0,0,0}) defined by its Radius R and half-length Z and an (infinite) line defined by two 3D points A and B which does not have any intersection with the cylinder. What is the best way to compute the point on the cylinder surface which is closest to this line and display this with Graphics3D (building up on Calculating and displaying intersection of cylinder and line)
Edit: Ideally I would want a completely analytical solution to get the point on the surface, if possible.