def _triangle_coords(r, geom, best):
 r1 = geom['r1'][best]
 tri_nn = geom['nn'][best]
 r12 = geom['r12'][best]
 r13 = geom['r13'][best]
 a = geom['a'][best]
 b = geom['b'][best]
 c = geom['c'][best]
 rr = (r - r1)
 z = np.sum((rr * tri_nn))
 v1 = np.sum((rr * r12))
 v2 = np.sum((rr * r13))
 det = ((a * b) - (c * c))
 x = (((b * v1) - (c * v2)) / det)
 y = (((a * v2) - (c * v1)) / det)
 return (x, y, z)

def _triangle_coords ( r , geom , best ) : r1 = geom [ 'r1' ] [ best ] tri_nn = geom [ 'nn' ] [ best ] r12 = geom [ 'r12' ] [ best ] r13 = geom [ 'r13' ] [ best ] a = geom [ 'a' ] [ best ] b = geom [ 'b' ] [ best ] c = geom [ 'c' ] [ best ] rr = ( r - r1 ) z = np . sum ( ( rr * tri_nn ) ) v1 = np . sum ( ( rr * r12 ) ) v2 = np . sum ( ( rr * r13 ) ) det = ( ( a * b ) - ( c * c ) ) x = ( ( ( b * v1 ) - ( c * v2 ) ) / det ) y = ( ( ( a * v2 ) - ( c * v1 ) ) / det ) return ( x , y , z )
get coordinates of a vertex projected to a triangle .