pysted.temporal.Fiber.generate_random
- Fiber.generate_random(num_points=(10, 50), angle=(-0.39269908169872414, 0.39269908169872414), scale=(1, 5), pos=((0, 0), (0, 0)), seed=None)
Generates a random set of points.
To do so, we incrementaly add a point to list of coordinates. It could be seen as building a serpent from the head to the tail.
- Parameters:
num_points – (min, max) values of the uniform sampling to generate the number of points of the fiber
angle – (min, max) values of the uniform sampling to generate the angle from the previous angle
scale – (min, max) values of the uniform sampling to generate the displacement
pos – Uniformly sample a position of the
Fiber
object. Should be atuple
of top-left and bottom-right corner in (y, x) coordinates
- Returns:
A (N,2)
numpy.ndarray
of coordinates