Press the flag to randomize location and mass. kg2 & 3 are the masses of each object, m is the distance between the two, n2 & n3 are the pull of each of the objects, and x2, y2, x3, and y3 are the coordinates. Once they touch, just hit the flag again if you want.
thanks to wikipedia.