def get_3d_ps(ps,p0,p1):
    """
    Reorders XYZ coordinate pairs, rotating as necessary to display correctly.

    Parameters
    ----------
    ps : numpy.ndarray
        A set of coordinates for each joint.
    p0 : int
        Index for the start joint.
    p1 : int
        Index for the end joint.

    Returns
    -------
    ps_3d : list of list
        The start and end points for the XYZ coordinates.
    """
    return [ps[p0][0],ps[p1][0]],[ps[p0][2],ps[p1][2]],[-ps[p0][1],-ps[p1][1]];