def point_idx_to_term(idx):
    """
        Convert point indices to the terms it represent.

        idx| 0 |  1 | 2 |  3 | 4 |
        --------------------------
           | 0 | -1 | 1 | -2 | 2 |
    """
    if idx == 0:
        return 0
    residual = (idx - 1) % 2
    term_abs = (idx + 1) // 2
    term = term_abs * -1 if residual == 0 else term_abs
    return term
