pysted.temporal.Polygon.generate_random
- Polygon.generate_random(num_points=(5, 25), scale=(10, 15), pos=((0, 0), (0, 0)))
Generates a random set of coords.
To do so, we make use of the Convex Hull of a random set of points
- Parameters:
num_points – Uniformly generates a number of points for the convex hull between num_points[0] and num_points[1]
scale – Uniformly generates a scale factor for the convex hull between scale[0] and scale[1]
pos – Uniformly positions the convex hull in space. Should be a
tuple
of top-left and bottom-right corner in (y, x) coordinates
- Returns:
A (N,2)
numpy.ndarray
of coordinates