INNER CODE UNIT · Python

vec

VITA-Group/Diffusion4D · rendering/blender.py:90

        vec = np.random.uniform(-1, 1, 3)
        #         vec[2] = np.abs(vec[2])
        radius = np.random.uniform(radius_min, radius_max, 1)
        vec = vec / np.linalg.norm(vec, axis=0) * radius[0]
        if maxz > vec[2] > minz:
            correct = True
    return vec


# def randomize_camera(
#     radius_min: float = 5,
#     radius_max: float = 5,
#     maxz: float = 2.2,
#     minz: float = -2.2,
#     only_northern_hemisphere: bool = False,
# ) -> bpy.types.Object:
#     """Randomizes the camera location and rotation inside of a spherical shell.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…