C# Attractor Query

Hello, I am a newbie to Rhino grasshopper & C# coding. I have a query regarding C#. I am able to control/affect the sphere sizes in the grid with the attractor point P. Now I want an another point named P2 which will act as repulsor which means it will have the opposite effect to the grid points than that of the attractor Point P. Thank you in advance.
C# Query.gh (9.1 KB)

I know very little about C# but this seems to work? Had to set Type Hint for P2 to Point3d.

        double radius = P.DistanceTo(a) / 10;
        double radius2 = (1.5 * size) / Math.Max(P2.DistanceTo(a), size);
        gridSphere[i][j] = new Sphere(a, (radius + radius2) / 2);


C# Query_2022Oct30a.gh (11.8 KB)