get_random_points#

random_shapes.get_random_points(n: int = 5, scale: float = 0.8, mindst: float | None = None, rec: int = 0) list[Point][source]#

Create n random points in the unit square, which are mindst apart, then scale them.

Parameters:
  • n (int, optional) – Number of points. Defaults to 5.

  • scale (float, optional) – Scaling factor. Defaults to 0.8.

  • mindst (float, optional) – Minimum distance between points. Defaults to None.

  • rec (int, optional) – Recursion counter. Defaults to 0.

Returns:

A list of points of length n.

Return type:

list[Point]