Targets
A collection of useful primatives for scattering and propagation modelling, including a meshedHorn function for consistent definition of Horn antennas.
Targets is named so because it generates objects for the purpose of scattering rays and calculating their contribution to the channel.
The most general purpose function in Targets is :func:’source_cloud_from_shape’ which can be used to mesh a shape with consistently spaced scattering or source points with normal vectors inherited from the surface normals of the solid.
- lyceanem.geometry.targets.meshedHorn(majorsize, minorsize, length, edge_width, flare_angle, grid_resolution, sides='front')[source]
A basic horn antenna, providing the aperture points, and the basic physical structure The horn is orientated with the centre of the aperture at the origin, and the boresight aligned with the positive z direction.
- Parameters:
majorsize (float) – the width of the horn aperture in the x direction
minorsize (float) – the width of the horn aperture in the y direction
length (float) – the length of the horn structure
edge_width (float) – the width of the physical structure around the horn
flare_angle – the taper angle of the horn
grid_resolution (float) – the spacing between the aperture points, should be half a wavelength at the frequency of interest
sides (str) – command for the mesh, default is ‘front’, and for a horn, this should not be changed.
- Returns:
structure (
open3d.geometry.TriangleMesh
) – the physical structure of the hornmesh_points (
open3d.geometry.PointCloud
) – the source points for the horn aperture
- lyceanem.geometry.targets.meshedReflector(majorsize, minorsize, thickness, grid_resolution, sides='all')[source]
A helper function which creates a meshed cuboid with the front face center at the origin, and with the boresight aligned with the positive z direction
- Parameters:
majorsize (float) – the width of the cuboid in the x direction
minorsize (float) – the width of the cuboid in the y direction
thickness (float) – the thickness of the cuboid structure
grid_resolution (float) – the spacing between the scattering points, should be half a wavelength at the frequency of interest
sides (str) –
command for the mesh, default is ‘all’, creating a mesh of surface points on all sides of the cuboid, other options are ‘front’ which only creates points for the side aligned with the positive z direction, or ‘centres’,
which creates a point for the centre of each side.
- Returns:
reflector (
open3d.geometry.TriangleMesh
) – the defined cuboidmesh_points (
open3d.geometry.PointCloud
) – the scattering points, spaced at grid_resolution seperation between each point, and with normal vectors from the populating surfaces
- lyceanem.geometry.targets.source_cloud_from_shape(o3dshape, ideal_point_sep, maxdeviation=0.01)[source]
sample surface or mesh and return surface algined points on that mesh
- Parameters:
o3dshape (
open3d.geometry.TriangleMesh
) – the surface or shape of interestideal_point_sep (float) – the desired spacing between each point and it’s nearest neighbours, for apertures, this is usually half a wavelength at the highest frequency of interest
maxdeviation (float) – the maximum allowable deviation between the ideal point seperation and the average point seperation, as a fraction
- Returns:
source_cloud (
open3d.geometry.PointCloud
) – the sampled points on the surface, with normal vectors aligned with the surface normal vectorsareas (array of float32) – the area of each triangle in the
open3d.geometry.TriangleMesh
in world units, as long as the surface is specified in metres, this will be sqm, alinged with the triangle index in the surface.