snnib.blender.utils.random¶
functions for random generation
Exceptions
Classes
- Functions
random_points_bbox() – generates random points inside a bounding box
random_points_raycast() – BROKEN; generates random points based on raycasting
Other Objects
Functions
|
generates n random points inside the bounding box of obj |
|
BROKEN; generates a random points inside obj |
|
|
|
- snnib.blender.utils.random.random_points_bbox(obj: bpy.types.Object, Rng: Generator, n: int = 1) ndarray[source]¶
generates n random points inside the bounding box of obj
- Parameters
- obj
bpy.types.Object
object to use the bounding box of
- Rng
np.random.Generator
random number generator
- n
int, optional
number of points to generate
the default is 1
Raises
- Returns
- coords
np.ndarray
has shape (n,3)
randomly generated coordinates
- Dependencies
bpy
mathutils
numpy
logging
typing
- snnib.blender.utils.random.random_points_raycast(obj: bpy.types.Object, Rng: Generator, n: int = 1) ndarray[source]¶
BROKEN; generates a random points inside obj
- Parameters
- obj
bpy.types.Object
object to use as host
- Rng
np.random.Generator
random number generator
- n
int, optional
number of points to generate
the default is 1
Raises
- Returns
- coords
np.ndarray
has shape (n,3)
randomly generated coordinates
- Dependencies
bpy
mathutils
numpy
logging
typing