3d structure added to point
maximum distance for vector of points trial function added