def index_height(index):
    """Returns the height based on the index of the crossing in an entry
    of a planar diagram; the 0th and 2nd indices are under crossings,
    and the 1st and 3rd are over crossings.

    """
    if index in (0, 2):
        return -1.0
    return 1.0
