INNER CODE UNIT · Python
_sample_spherical
VITA-Group/Diffusion4D · rendering/blender.py:70
def _sample_spherical(
radius_min: float = 1.5,
radius_max: float = 2.0,
maxz: float = 1.6,
minz: float = -0.75,
) -> np.ndarray:
"""Sample a random point in a spherical shell.
Args:
radius_min (float): Minimum radius of the spherical shell.
radius_max (float): Maximum radius of the spherical shell.
maxz (float): Maximum z value of the spherical shell.
minz (float): Minimum z value of the spherical shell.
Returns:
np.ndarray: A random (x, y, z) point in the spherical shell.
"""
correct = False