original_docstring: [it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle.]
  
      Args:
          mS ([np array 3135x3]): [vertex S of triangle]
          mU ([np array 3135x3ype]): [vertex U of triangle]
          mT ([np array 3135x3]): [vertex T of triangle]
          sk ([np array nx3]): [input closest point value, ]
  
      Returns:
         ck [np array nx3]: [closest point on triangle to sk]
         q0k : as given in the mathematical explanation
      
docstring: [it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle.]
docstring_tokens: [ it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle . ]
code: def closestPoint(mS, mU, mT, sk):
      """[it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle.]
  
      Args:
          mS ([np array 3135x3]): [vertex S of triangle]
          mU ([np array 3135x3ype]): [vertex U of triangle]
          mT ([np array 3135x3]): [vertex T of triangle]
          sk ([np array nx3]): [input closest point value, ]
  
      Returns:
         ck [np array nx3]: [closest point on triangle to sk]
         q0k : as given in the mathematical explanation
      """
      ck = []
      q0k = []
      itr = 0
      lenSk = int(len(sk))
      for i in range(lenSk):
          for j in range(len(mS)):
              TRI = np.array([mS[j], mU[j], mT[j]])
  
              EstDist, Estpp0 = TriclosestPoint(TRI, sk[i])
  
              if j == 0:
                  dist = EstDist
                  pp0 = Estpp0
  
              if EstDist < dist:
                  dist = EstDist
                  pp0 = Estpp0
                  itr = j
  
          point = pp0
          a = np.array(mS[itr])
          b = np.array(mU[itr])
          c = np.array(mT[itr])
          l1, l2, l3 = barycentric.barycentric_coordinates(point, a, b, c)
          q0 = l1*a + l2 * b + l3*c
  
          ck.append(pp0)
          q0k.append(q0)
      ck = np.array(ck)
      q0k = np.array(q0k)
  
      return ck, q0k
code_tokens: def closestPoint ( mS , mU , mT , sk ) : ck = [ ] q0k = [ ] itr = 0 lenSk = int ( len ( sk ) ) for i in range ( lenSk ) : for j in range ( len ( mS ) ) : TRI = np . array ( [ mS [ j ] , mU [ j ] , mT [ j ] ] ) EstDist , Estpp0 = TriclosestPoint ( TRI , sk [ i ] ) if j == 0 : dist = EstDist pp0 = Estpp0 if EstDist < dist : dist = EstDist pp0 = Estpp0 itr = j point = pp0 a = np . array ( mS [ itr ] ) b = np . array ( mU [ itr ] ) c = np . array ( mT [ itr ] ) l1 , l2 , l3 = barycentric . barycentric_coordinates ( point , a , b , c ) q0 = l1 * a + l2 * b + l3 * c ck . append ( pp0 ) q0k . append ( q0 ) ck = np . array ( ck ) q0k = np . array ( q0k ) return ck , q0k
short_docstring: [it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle.]
short_docstring_tokens: [ it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle . ]
comment: """[it calcualtes the closest point on the triangle with finding the closest posssible point and matching the closest point on the triangle.]
  
      Args:
          mS ([np array 3135x3]): [vertex S of triangle]
          mU ([np array 3135x3ype]): [vertex U of triangle]
          mT ([np array 3135x3]): [vertex T of triangle]
          sk ([np array nx3]): [input closest point value, ]
  
      Returns:
         ck [np array nx3]: [closest point on triangle to sk]
         q0k : as given in the mathematical explanation
      """