dhart.viewanalysis.SphericallyDistributeRays¶
- dhart.viewanalysis.SphericallyDistributeRays(num_rays: int, upward_fov: float = 50, downward_fov: float = 70) ViewAnalysisDirections ¶
Distribute directions evenly in a sphere.
This is the same algorithm used in the other view analysis functions, so the output of this can be used to get the hit points of results from SphericalViewAnalysis.
- Parameters:
num_rays – the number of directions to generate, Note that the actual number may be higher
upward_fov – the maximum angle upwards to generate directions for in degrees
downward_fov – the maximum angle downwards to generate directions for in degrees
- Returns:
A two dimensional array of directions
Examples
>>> from dhart.viewanalysis import SphericallyDistributeRays >>> print(SphericallyDistributeRays(10)) [[-0. -1. 0. ] [-0.26500335 -0.8181818 -0.51024675] [ 0.7245825 -0.63636374 0.2646158 ] [-0.8233362 -0.45454547 0.33986175] [ 0.40777823 -0.2727272 -0.87139934] [-0.86162955 0.09090906 -0.49932963] [ 0.93965095 0.2727273 -0.20658147] [-0.51228005 0.45454556 0.72866833] [-0.09913298 0.6363636 -0.7649929 ] [ 0.4396428 0.8181818 0.37053034]]