import math


def ComputeLucyWeight(c,dist):
    """Compute the CG weight using a Lucy function
    c = cuteoff distance (scalar)
    dist = distance between the CG and discrete points (scalar)
    Output:
    W = interpolation weight
    """
    W = 105/(16*math.pi*c**3) * (-3*(dist/c)**4+8*(dist/c)**3-6*(dist/c)**2+1)
    return W