code: def projection(pnormal1, ppoint, tpoint):
      
      # Choose the plane normal pointing to the point to be projected
      pnormal2 = [coo*(-1) for coo in pnormal1]
      d1 = self.euclidean3d(tpoint, pnormal1 + ppoint)
      d2 = self.euclidean3d(tpoint, pnormal2 + ppoint)
      pnormal = pnormal1 if d1 < d2 else pnormal2
      # Calculate the projection of tpoint to the plane
      sn = -np.dot(pnormal, self.vector(ppoint, tpoint))
      sd = np.dot(pnormal, pnormal)
      sb = sn / sd
      return [c1 + c2 for c1, c2 in zip(tpoint, [sb * pn for pn in pnormal])]
docs: Calculates the centroid from a 3D point cloud and returns the coordinates
      :param pnormal1: normal of plane
      :param ppoint: coordinates of point in the plane
      :param tpoint: coordinates of point to be projected
      :returns : coordinates of point orthogonally projected on the plane