<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def triangular_coord(coord):
 """ Convert a 2D coordinate into a triangle-based coordinate system for a prettier phase diagram. Args: coordinate: coordinate used in the convex hull computation. Returns: coordinates in a triangular-based coordinate system. """

    unitvec = np.array([[1, 0], [0.5, math.sqrt(3) / 2]])
    result = np.dot(np.array(coord), unitvec)
    return result.transpose()