title: Distance to convex hull from point in 3d in Python
body: <p>I am looking for distance from a point to a ConvexHull object in 3D in Python. </p>
  
  <p>I found the questions that solve the problem in 2D:
  <a href="https://stackoverflow.com/questions/23937076/distance-to-convexhull">Distance to convexHull</a> and 
  <a href="https://stackoverflow.com/questions/41000123/computing-the-distance-to-a-convex-hull">Computing the distance to a convex hull</a></p>
  
  <p>But those do not contain a solution for 3D.</p>
  
  <pre><code>import numpy as np
  from scipy.spatial import ConvexHull
  
  mat = np.random.rand(100,3)
  hull = ConvexHull(mat)
  points = np.random.rand(10,3)
  </code></pre>
  
  <p>It would be great to have a function</p>
  
  <pre><code>dist(hull,points)
  </code></pre>
  
  <p>that returns a list of distances from the points to the convex hull, having different signs for points within and outside of the convex hull.</p>