Skip to content

Commit

Permalink
Removing references to open3d in the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
LyceanEM committed May 29, 2024
1 parent 363db41 commit b6f13d7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
12 changes: 6 additions & 6 deletions docs/examples/01_aperture_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# Geometries
# ------------------------
# In order to make things easy to start, an example geometry has been included within LyceanEM for a UAV, and the
# open3d trianglemesh structures can be accessed by importing the data subpackage
# meshio trianglemesh structures can be accessed by importing the data subpackage
import lyceanem.tests.reflectordata as data

body, array, _ = data.exampleUAV(10e9)
Expand All @@ -71,7 +71,7 @@
# LyceanEM uses a class named 'structures' to store and maniuplate joined 3D solids. Currently all that is implemented
# is the class itself, and methods to allow translation and rotation of the trianglemesh solids. A structure can be
# passed to the models to provide the environment to be considered as blockers.
# structures are created by calling the class, and passing it a list of the open3d trianglemesh structures to be added.
# structures are created by calling the class, and passing it a list of the meshio trianglemesh structures to be added.
from lyceanem.base_classes import structures

blockers = structures([body])
Expand All @@ -81,7 +81,7 @@
# -----------------------
# Aperture Projection is imported from the frequency domain models, requiring the aperture of interest, wavelength to
# be considered, and the azimuth and elevation ranges. The function then returns the directivity envelope as a numpy
# array of floats, and an open3d point cloud with points and colors corresponding to the directivity envelope of the
# array of floats, and a meshio point cloud with points and colors corresponding to the directivity envelope of the
# provided aperture, scaling from yellow at maximum to dark purple at minimum.
from lyceanem.models.frequency_domain import aperture_projection

Expand All @@ -93,10 +93,10 @@
elev_range=np.linspace(-90.0, 90.0, elev_res),
)
# %%
# Open3D Visualisation
# Visualisation
# ------------------------
# The resultant maximum directivity envelope is provided as both a numpy array of directivities for each angle, but
# also as an open3d point cloud. This allows easy visualisation using :func:`open3d.visualization.draw_geometries`.
# also as an meshio point cloud. This allows easy visualisation using pyvista.
# %%


Expand All @@ -114,7 +114,7 @@
# %%
# Plotting the Output
# ------------------------
# While the open3d visualisation is very intuitive for examining the results of the aperture projection, it is
# While the pyvista visualisation is very intuitive for examining the results of the aperture projection, it is
# difficult to consider the full 3D space, and cannot be included in documentation in this form. However, matplotlib
# can be used to generate contour plots with 3dB contours to give a more systematic understanding of the resultant
# maximum directivity envelope.
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/02_coherently_polarised_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# Geometries
# ------------------------
# In order to make things easy to start, an example geometry has been included within LyceanEM for a UAV, and the
# :class:`open3d.geometry.TriangleMesh` structures can be accessed by importing the data subpackage
# triangle structures can be accessed by importing the data subpackage
import lyceanem.tests.reflectordata as data

body, array, source_coords = data.exampleUAV(10e9)
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/04_time_domain_channel_modelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
# Position Transmitter
# ----------------------
# rotate the transmitting antenna to the desired orientation, and then translate to final position.
# :func:`lyceanem.geometry.geometryfunctions.open3drotate` allows both the center of rotation to be defined, and
# ensures the right syntax is used for Open3d, as it was changed from 0.9.0 to 0.10.0 and onwards.
# :func:`lyceanem.geometry.geometryfunctions.translate_mesh`, :func:`lyceanem.geometry.geometryfunctions.mesh_rotate` and :func:`lyceanem.geometry.geometryfunctions.mesh_transform` are included, allowing translation, rotation, and transformation of the meshio objects as required.
#
rotation_vector1 = np.radians(np.asarray([90.0, 0.0, 0.0]))
rotation_vector2 = np.radians(np.asarray([0.0, 0.0, -90.0]))
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/05_array_beamforming.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# Geometries
# ------------------------
# In order to make things easy to start, an example geometry has been included within LyceanEM for a UAV, and the
# :class:`open3d.geometry.TriangleMesh` structures can be accessed by importing the data subpackage
# mesh structures can be accessed by importing the data subpackage
import lyceanem.tests.reflectordata as data

body, array, source_coords = data.exampleUAV(10e9)
Expand Down
11 changes: 10 additions & 1 deletion lyceanem/geometry/geometryfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ def tri_centroids(triangle_mesh):

def mesh_rotate(mesh, rotation, rotation_centre=np.zeros((1, 3), dtype=np.float32)):
"""
Rotate a mesh by a given rotation vector about a given center.
Rotate the provided meshio mesh about an arbitary center using either rotation vector or rotation matrix.
Parameters
----------
mesh
rotation
rotation_centre
Returns
-------
mesh
"""
if rotation.shape == (3,):
r = R.from_rotvec(rotation)
Expand Down

0 comments on commit b6f13d7

Please sign in to comment.