Make Fluxion with the distance between body i and j

def flux_r2(q_vars: List[fl.Var], i: int, j: int):
    """Make Fluxion with the distance between body i and j"""
    # Indices with the base of (x, y, z) for each body
    k0 = 3*i
    k1 = 3*j
    # The squared distance bewteen body i and j as a Fluxion instance
    return fl.square(q_vars[k1+0] - q_vars[k0+0]) + \
           fl.square(q_vars[k1+1] - q_vars[k0+1]) + \
           fl.square(q_vars[k1+2] - q_vars[k0+2])