N(j, k) = 1/(1 + (d(j, k) / (202 * n2))
d(j, k) = (xj - xk)2 + (yj - yk)2
where xj is the x screen coordinate of unit j, yj is the y screen coordinate of unit j, 20 is the width in pixels of a unit (rescaling into unit widths) and n is a neighbourhood size parameter that can be altered to change the rate at which the function decreases.