lagrange.geodesic¶
Classes¶
Module Contents¶
- class lagrange.geodesic.GeodesicEngineDGPC(arg, /)¶
- Parameters:
- point_to_point_geodesic(source_facet_id, target_facet_id, source_facet_bc, target_facet_bc)¶
Compute geodesic distance between two points on the mesh.
- Parameters:
source_facet_id (int) – Facet containing the source point.
target_facet_id (int) – Facet containing the target point.
source_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the source point within the source facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
target_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the target point within the target facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
- Returns:
The geodesic distance between the two points.
- Return type:
float
- single_source_geodesic(source_facet_id, source_facet_bc, ref_dir=[0.0, 1.0, 0.0], second_ref_dir=[1.0, 0.0, 0.0], radius=-1.0, output_geodesic_attribute_name='@geodesic_distance', output_polar_angle_attribute_name='@polar_angle')¶
Compute single-source geodesic distances on the mesh.
- Parameters:
source_facet_id (int) – The facet ID of the seed facet.
source_facet_bc (collections.abc.Sequence[float]) – The barycentric coordinates of the seed facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
ref_dir (collections.abc.Sequence[float]) – The reference up direction for the geodesic polar coordinates.
second_ref_dir (collections.abc.Sequence[float]) – The secondary reference up direction for the geodesic polar coordinates
radius (float) – The maximum geodesic distance from the seed point to consider. Negative value means no limit.
output_geodesic_attribute_name (str) – The name of the output attribute to store the geodesic distance.
output_polar_angle_attribute_name (str) – The name of the output attribute to store the geodesic polar coordinates.
- Returns:
The attribute IDs of the computed geodesic distance and polar angle attributes.
- Return type:
tuple[int, int]
- class lagrange.geodesic.GeodesicEngineHeat(arg, /)¶
- Parameters:
- point_to_point_geodesic(source_facet_id, target_facet_id, source_facet_bc, target_facet_bc)¶
Compute geodesic distance between two points on the mesh.
- Parameters:
source_facet_id (int) – Facet containing the source point.
target_facet_id (int) – Facet containing the target point.
source_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the source point within the source facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
target_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the target point within the target facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
- Returns:
The geodesic distance between the two points.
- Return type:
float
- single_source_geodesic(source_facet_id, source_facet_bc, output_geodesic_attribute_name='@geodesic_distance')¶
Compute single-source geodesic distances on the mesh.
- Parameters:
source_facet_id (int) – The facet ID of the seed facet.
source_facet_bc (collections.abc.Sequence[float]) – The barycentric coordinates of the seed facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
output_geodesic_attribute_name (str) – The name of the output attribute to store the geodesic distance.
- Returns:
The attribute ID of the computed geodesic distance attributes.
- Return type:
int
- class lagrange.geodesic.GeodesicEngineMMP(arg, /)¶
- Parameters:
- point_to_point_geodesic(source_facet_id, target_facet_id, source_facet_bc, target_facet_bc)¶
Compute geodesic distance between two points on the mesh.
- Parameters:
source_facet_id (int) – Facet containing the source point.
target_facet_id (int) – Facet containing the target point.
source_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the source point within the source facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
target_facet_bc (collections.abc.Sequence[float]) – Barycentric coordinates of the target point within the target facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
- Returns:
The geodesic distance between the two points.
- Return type:
float
- single_source_geodesic(source_facet_id, source_facet_bc, radius=-1.0, output_geodesic_attribute_name='@geodesic_distance')¶
Compute single-source geodesic distances on the mesh.
- Parameters:
source_facet_id (int) – The facet ID of the seed facet.
source_facet_bc (collections.abc.Sequence[float]) – The barycentric coordinates of the seed facet. Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.
radius (float) – The maximum geodesic distance from the seed point to consider. Negative value means no limit.
output_geodesic_attribute_name (str) – The name of the output attribute to store the geodesic distance.
- Returns:
The attribute ID of the computed geodesic distance attributes.
- Return type:
int