code: def calcRandomAnchors(args, inworld=True):
      
      anchors = []
      rng = (args.patchRadius, args.worldSize - args.patchRadius)
      if not inworld:
          rng = (0, args.worldSize)
      for i in range(args.nPatches):
          anchors.append((random.randrange(rng[0], rng[1]),
                          random.randrange(rng[0], rng[1])))
  
      return anchors
docs: Generates a list of random anchor points such that all circles will fit
      in the world, given the specified radius and worldsize.
      The number of anchors to generate is given by nPatches