Polygon.get_point_inside

Polygon.get_point_inside(n_pts: int = 1, delta: float = 0, max_iter=100000.0) ndarray[source]

Draw random points inside the polygon by rejection sampling.

Parameters:
  • n_pts (int, optional) – Number of points to generate.

  • delta (float, optional) – Minimum distance kept from the boundary.

  • max_iter (int, optional) – Maximum number of rejection-sampling iterations.

Returns:

Generated points of shape (n_pts, 2).

Return type:

np.ndarray