Function kernel::numerics::find_closest_point_to

Function Documentation

const GeomPoint<2> kernel::numerics::find_closest_point_to(const LineMesh<2> &mesh, const GeomPoint<2> &p, uint_t nsamples, real_t tol)

Find the closest point on the given LineMesh The function loops over the elements in the mesh and uses samples the EdgeElement using the given number of sampling points plus two as it accounts for the vertices as well. From the calculated points it picks the one with the smallest distance.