def prism_barycentric_coordinates(tri1, tri2, pt):
pt = np.asarray(pt)<EOL>tri1 = np.asarray(tri1)<EOL>tri2 = np.asarray(tri2)<EOL>(tri1,tri2) = [<EOL>(np.transpose(tri, (<NUM_LIT:1>,<NUM_LIT:0>) if len(tri.shape) == <NUM_LIT:2> else (<NUM_LIT:2>,<NUM_LIT:0>,<NUM_LIT:1>)) if tri.shape[<NUM_LIT:0>] != <NUM_LIT:3> else<EOL>np.transpose(tri, (<NUM_LIT:0>,<NUM_LIT:2>,<NUM_LIT:1>))                                   if tri.shape[<NUM_LIT:1>] != <NUM_LIT:3> else<EOL>tri)<EOL>for tri in (tri1,tri2)]<EOL>pt = pt.T if pt.shape[<NUM_LIT:0>] != <NUM_LIT:3> else pt<EOL>bcs1 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:0>], tri1[<NUM_LIT:1>], tri1[<NUM_LIT:2>], tri2[<NUM_LIT:0>]], pt)<EOL>bcs2 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:1>], tri1[<NUM_LIT:2>], tri2[<NUM_LIT:0>], tri2[<NUM_LIT:1>]], pt)<EOL>bcs3 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:2>], tri2[<NUM_LIT:0>], tri2[<NUM_LIT:1>], tri2[<NUM_LIT:2>]], pt)<EOL>bcs4 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:0>], tri1[<NUM_LIT:1>], tri2[<NUM_LIT:0>], tri2[<NUM_LIT:1>]], pt)<EOL>bcs5 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:0>], tri1[<NUM_LIT:2>], tri2[<NUM_LIT:0>], tri2[<NUM_LIT:2>]], pt)<EOL>bcs6 = tetrahedral_barycentric_coordinates([tri1[<NUM_LIT:1>], tri1[<NUM_LIT:2>], tri2[<NUM_LIT:1>], tri2[<NUM_LIT:2>]], pt)<EOL>bcs = ((bcs1[<NUM_LIT:0>] + bcs4[<NUM_LIT:0>] + bcs5[<NUM_LIT:0>],<EOL>bcs1[<NUM_LIT:1>] + bcs2[<NUM_LIT:0>] + bcs4[<NUM_LIT:1>] + bcs6[<NUM_LIT:0>],<EOL>bcs1[<NUM_LIT:2>] + bcs2[<NUM_LIT:1>] + bcs3[<NUM_LIT:0>] + bcs5[<NUM_LIT:1>] + bcs6[<NUM_LIT:1>]),<EOL>(bcs1[<NUM_LIT:3>] + bcs2[<NUM_LIT:2>] + bcs3[<NUM_LIT:1>] + bcs4[<NUM_LIT:2>] + bcs5[<NUM_LIT:2>],<EOL>bcs2[<NUM_LIT:3>] + bcs3[<NUM_LIT:2>] + bcs4[<NUM_LIT:3>] + bcs6[<NUM_LIT:2>],<EOL>bcs3[<NUM_LIT:3>] + bcs5[<NUM_LIT:3>] + bcs6[<NUM_LIT:3>]))<EOL>abc = np.sum(bcs, axis=<NUM_LIT:0>)<EOL>d = np.sum(bcs[<NUM_LIT:1>], axis=<NUM_LIT:0>)<EOL>return np.asarray((abc[<NUM_LIT:0>], abc[<NUM_LIT:1>], d))<EOL>
prism_barycentric_coordinates(tri1, tri2, point) yields a list of weights for each vertex
  in the given tetrahedron in the same order as the vertices given. If all weights are 0, then
  the point is not inside the tetrahedron. The returned weights are (a,b,d) in a numpy array;
  the values a, b, and c are the barycentric coordinates corresponding to the three points of
  the triangles (where c = (1 - a - b) and the value d is the fractional distance (in the range
  [0,1]) of the point between tri1 (d=0) and tri2 (d=1).