e15190.utilities.ray_triangle_intersection.emit_isotropic_rays¶
- e15190.utilities.ray_triangle_intersection.emit_isotropic_rays(n_rays, polar_range=[0, 3.141592653589793], azimuth_range=[- 3.141592653589793, 3.141592653589793], random_seed=None, frame='cartesian')¶
Return rays with random directions (isotropic emission).
- Parameters
n_rays – int Number of rays to be emitted.
polar_range – 2-tuple or 2-list, default [0, np.pi] The range of polar angles in radians.
azimuth_range – 2-tuple or 2-list, default [-np.pi, np.pi] The range of azimuth angles in radians.
random_seed – int, default None Random seed for the random number generator. If None, then the randomization is non-reproducible.
frame – ‘cartesian’ or ‘spherical’, default ‘cartesian’ If ‘cartesian’, the rays are returned as rows of (x, y, z); if ‘spherical’, the rays are returned as rows of (1, theta, phi), in radians.
- Returns
A numpy.ndarray of rays with shape (n_rays, 3).