Raycasting

lyceanem.raycasting.rayfunctions.visiblespace(source_coords, source_normals, environment, vertex_area=0, az_range=array([-180., -160., -140., -120., -100., -80., -60., -40., -20., 0., 20., 40., 60., 80., 100., 120., 140., 160., 180.]), elev_range=array([-90., -80., -70., -60., -50., -40., -30., -20., -10., 0., 10., 20., 30., 40., 50., 60., 70., 80., 90.]), shell_range=0.5)[source]

Visiblespace generates a matrix stack of visible space for each element, indexed by source_coordinate.

Parameters:
  • source_coords (n by 3 numpy array of floats) – xyz coordinates of the sources

  • source_normals (n by 3 numpy array of floats) – normal vectors for each source point

  • environment (lyceanem.base_classes.triangles) – blocking environment

  • vertex_area (float or array of floats) – the area associated with each source point, defaults to 0, but can also be specified for each source

  • az_range (array of float) – array of azimuth planes in degrees

  • elev_range (array of float) – array of elevation points in degrees

  • shell_range (float) – radius of point cloud shell

Returns:

  • visible_patterns (m by l by n array of floats) – 3D antenna patterns

  • resultant_pcd (open3d pointcloud) – colour data to scale the points fractional visibility from the source aperture

lyceanem.raycasting.rayfunctions.workchunkingv2(sources, sinks, scattering_points, environment, max_scatter, line_of_sight=True)[source]

Raycasting index creation and assignment to raycaster, upper bound is around 4.7e8 rays at a time, there is already chunking to prevent overflow of the GPU memory and timeouts

Parameters:
  • sources (n*3 numpy array of float) –

  • sinks (m*3 numpy array of float) –

  • scattering_points (o*3 numpy array of float) –

  • environment (numpy array of triangle_t) –

  • max_scatter (int) –

  • line_of_sight (boolean) –

Returns:

  • full_index (2D numpy array of ints) – the index for all successful rays cast from source coordinates, to any scattering points, to the sink point for each entry

  • RAYS_CAST (int) – the number of rays cast in this launch.