artist.util.raytracing_utils
Functions
|
Reflect incoming rays given the normals of reflective surfaces. |
|
Compute line-plane intersections of the rays and the (receiver) planes. |
Module Contents
- artist.util.raytracing_utils.reflect(incident_ray_directions: torch.Tensor, reflection_surface_normals: torch.Tensor) torch.Tensor
Reflect incoming rays given the normals of reflective surfaces.
Parameters
- incident_ray_directionstorch.Tensor
The direction of the incident ray as seen from the heliostats. Tensor of shape [number_of_active_heliostats, 1, 4].
- reflection_surface_normalstorch.Tensor
The normals of the reflective surfaces. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_normals_all_facets, 4]
Returns
- torch.Tensor
The reflected rays. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_normals_all_facets, 4]
- artist.util.raytracing_utils.line_plane_intersections(rays: artist.scene.rays.Rays, points_at_ray_origins: torch.Tensor, target_areas: artist.field.tower_target_areas.TowerTargetAreas, target_area_mask: torch.Tensor | None = None, epsilon: float = 1e-06, device: torch.device | None = None) tuple[torch.Tensor, torch.Tensor]
Compute line-plane intersections of the rays and the (receiver) planes.
Parameters
- raysRays
The rays.
- points_at_ray_originstorch.Tensor
The surface points of the ray origins. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_points_all_facets, 4].
- target_areasTowerTargetAreas
All possible tower target areas with their properties.
- target_area_masktorch.Tensor | None
The indices of target areas corresponding to each heliostat (default is None). If none are provided, the first target area of the scenario will be linked to all heliostats. Tensor of shape [number_of_active_heliostats].
- epsilonfloat
A small value corresponding to the upper limit (default is 1e-6).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Raises
- ValueError
If there are no intersections on the front of the target plane.
Returns
- torch.Tensor
The intersections of the lines and planes. Tensor of shape [number_of_active_heliostats, number_of_rays, number_of_combined_surface_points_all_facets, 4].
- torch.Tensor
The absolute intensities of the rays hitting the target planes. Tensor of shape [number_of_active_heliostats, number_of_rays, number_of_combined_surface_points_all_facets].