You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defdist_point_to_segment(p, s0, s1):
""" Get the distance of a point to a segment. *p*, *s0*, *s1* are *xy* sequences This algorithm from http://geomalgorithms.com/a02-_lines.html """p=np.asarray(p, float)
s0=np.asarray(s0, float)
s1=np.asarray(s1, float)
v=s1-s0w=p-s0c1=np.dot(w, v)
ifc1<=0:
returndist(p, s0)
c2=np.dot(v, v)
ifc2<=c1:
returndist(p, s1)
b=c1/c2pb=s0+b*vreturndist(p, pb)
do we know the equivalent? or should we just add this piece of code to pyroms? @kshedstrom what do you think?
The text was updated successfully, but these errors were encountered:
function is :
do we know the equivalent? or should we just add this piece of code to pyroms?
@kshedstrom what do you think?
The text was updated successfully, but these errors were encountered: