Distance¶
Distance Type¶
- class ipctk.PointEdgeDistanceType¶
Bases:
pybind11_object
Members:
P_E0 : point is closest to edge vertex zero
P_E1 : point is closest to edge vertex one
P_E : point is closest to the interior of the edge
AUTO : automatically determine the closest point
-
AUTO =
<PointEdgeDistanceType.AUTO: 3>
¶
-
P_E =
<PointEdgeDistanceType.P_E: 2>
¶
-
P_E0 =
<PointEdgeDistanceType.P_E0: 0>
¶
-
P_E1 =
<PointEdgeDistanceType.P_E1: 1>
¶
-
__annotations__ =
{}
¶
- __eq__(self, other: object) bool ¶
- __getstate__(self) int ¶
- __hash__(self) int ¶
- __index__(self) int ¶
- __init__(self, value: int)¶
- __int__(self) int ¶
-
__members__ =
{'AUTO': <PointEdgeDistanceType.AUTO: 3>, 'P_E': <PointEdgeDistanceType.P_E: 2>, 'P_E0': <PointEdgeDistanceType.P_E0: 0>, 'P_E1': <PointEdgeDistanceType.P_E1: 1>}
¶
-
__module__ =
'ipctk'
¶
- __ne__(self, other: object) bool ¶
- __repr__(self) str ¶
- __setstate__(self, state: int) None ¶
- __str__(self) str ¶
- property name : str¶
- property value : int¶
-
AUTO =
- class ipctk.EdgeEdgeDistanceType¶
Bases:
pybind11_object
Members:
EA0_EB0 : edges are closest at vertex 0 of edge A and 0 of edge B
EA0_EB1 : edges are closest at vertex 0 of edge A and 1 of edge B
EA1_EB0 : edges are closest at vertex 1 of edge A and 0 of edge B
EA1_EB1 : edges are closest at vertex 1 of edge A and 1 of edge B
EA_EB0 : edges are closest at the interior of edge A and vertex 0 of edge B
EA_EB1 : edges are closest at the interior of edge A and vertex 1 of edge B
EA0_EB : edges are closest at vertex 0 of edge A and the interior of edge B
EA1_EB : edges are closest at vertex 1 of edge A and the interior of edge B
EA_EB : edges are closest at an interior point of edge A and B
AUTO : automatically determine the closest point
-
AUTO =
<EdgeEdgeDistanceType.AUTO: 9>
¶
-
EA0_EB =
<EdgeEdgeDistanceType.EA0_EB: 6>
¶
-
EA0_EB0 =
<EdgeEdgeDistanceType.EA0_EB0: 0>
¶
-
EA0_EB1 =
<EdgeEdgeDistanceType.EA0_EB1: 1>
¶
-
EA1_EB =
<EdgeEdgeDistanceType.EA1_EB: 7>
¶
-
EA1_EB0 =
<EdgeEdgeDistanceType.EA1_EB0: 2>
¶
-
EA1_EB1 =
<EdgeEdgeDistanceType.EA1_EB1: 3>
¶
-
EA_EB =
<EdgeEdgeDistanceType.EA_EB: 8>
¶
-
EA_EB0 =
<EdgeEdgeDistanceType.EA_EB0: 4>
¶
-
EA_EB1 =
<EdgeEdgeDistanceType.EA_EB1: 5>
¶
-
__annotations__ =
{}
¶
- __eq__(self, other: object) bool ¶
- __getstate__(self) int ¶
- __hash__(self) int ¶
- __index__(self) int ¶
- __init__(self, value: int)¶
- __int__(self) int ¶
-
__members__ =
{'AUTO': <EdgeEdgeDistanceType.AUTO: 9>, 'EA0_EB': <EdgeEdgeDistanceType.EA0_EB: 6>, 'EA0_EB0': <EdgeEdgeDistanceType.EA0_EB0: 0>, 'EA0_EB1': <EdgeEdgeDistanceType.EA0_EB1: 1>, 'EA1_EB': <EdgeEdgeDistanceType.EA1_EB: 7>, 'EA1_EB0': <EdgeEdgeDistanceType.EA1_EB0: 2>, 'EA1_EB1': <EdgeEdgeDistanceType.EA1_EB1: 3>, 'EA_EB': <EdgeEdgeDistanceType.EA_EB: 8>, 'EA_EB0': <EdgeEdgeDistanceType.EA_EB0: 4>, 'EA_EB1': <EdgeEdgeDistanceType.EA_EB1: 5>}
¶
-
__module__ =
'ipctk'
¶
- __ne__(self, other: object) bool ¶
- __repr__(self) str ¶
- __setstate__(self, state: int) None ¶
- __str__(self) str ¶
- property name : str¶
- property value : int¶
-
AUTO =
- class ipctk.PointTriangleDistanceType¶
Bases:
pybind11_object
Members:
P_T0 : point is closest to triangle vertex zero
P_T1 : point is closest to triangle vertex one
P_T2 : point is closest to triangle vertex two
P_E0 : point is closest to triangle edge zero (vertex zero to one)
P_E1 : point is closest to triangle edge one (vertex one to two)
P_E2 : point is closest to triangle edge two (vertex two to zero)
P_T : point is closest to the interior of the triangle
AUTO : automatically determine the closest point
-
AUTO =
<PointTriangleDistanceType.AUTO: 7>
¶
-
P_E0 =
<PointTriangleDistanceType.P_E0: 3>
¶
-
P_E1 =
<PointTriangleDistanceType.P_E1: 4>
¶
-
P_E2 =
<PointTriangleDistanceType.P_E2: 5>
¶
-
P_T =
<PointTriangleDistanceType.P_T: 6>
¶
-
P_T0 =
<PointTriangleDistanceType.P_T0: 0>
¶
-
P_T1 =
<PointTriangleDistanceType.P_T1: 1>
¶
-
P_T2 =
<PointTriangleDistanceType.P_T2: 2>
¶
-
__annotations__ =
{}
¶
- __eq__(self, other: object) bool ¶
- __getstate__(self) int ¶
- __hash__(self) int ¶
- __index__(self) int ¶
- __init__(self, value: int)¶
- __int__(self) int ¶
-
__members__ =
{'AUTO': <PointTriangleDistanceType.AUTO: 7>, 'P_E0': <PointTriangleDistanceType.P_E0: 3>, 'P_E1': <PointTriangleDistanceType.P_E1: 4>, 'P_E2': <PointTriangleDistanceType.P_E2: 5>, 'P_T': <PointTriangleDistanceType.P_T: 6>, 'P_T0': <PointTriangleDistanceType.P_T0: 0>, 'P_T1': <PointTriangleDistanceType.P_T1: 1>, 'P_T2': <PointTriangleDistanceType.P_T2: 2>}
¶
-
__module__ =
'ipctk'
¶
- __ne__(self, other: object) bool ¶
- __repr__(self) str ¶
- __setstate__(self, state: int) None ¶
- __str__(self) str ¶
- property name : str¶
- property value : int¶
-
AUTO =
- ipctk.point_edge_distance_type(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]]) ipctk.PointEdgeDistanceType ¶
Determine the closest pair between a point and edge.
- ipctk.edge_edge_distance_type(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) ipctk.EdgeEdgeDistanceType ¶
Determine the closest pair between two edges.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the first edge.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the first edge.
- eb0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the second edge.
- eb1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the second edge.
- Returns:¶
The distance type of the edge-edge pair.
- ipctk.point_triangle_distance_type(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]]) ipctk.PointTriangleDistanceType ¶
Determine the closest pair between a point and triangle.
Edge-Edge¶
- ipctk.edge_edge_distance(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.EdgeEdgeDistanceType = <EdgeEdgeDistanceType.AUTO: 9>) float ¶
Compute the distance between a two lines segments in 3D.
Note
The distance is actually squared distance.
- ipctk.edge_edge_distance_gradient(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.EdgeEdgeDistanceType = <EdgeEdgeDistanceType.AUTO: 9>) numpy.ndarray[numpy.float64[12, 1]] ¶
Compute the gradient of the distance between a two lines segments.
Note
The distance is actually squared distance.
- ipctk.edge_edge_distance_hessian(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.EdgeEdgeDistanceType = <EdgeEdgeDistanceType.AUTO: 9>) numpy.ndarray[numpy.float64[12, 12]] ¶
Compute the hessian of the distance between a two lines segments.
Note
The distance is actually squared distance.
Edge-Edge Mollifier¶
- ipctk.edge_edge_mollifier_threshold(ea0_rest: numpy.ndarray[numpy.float64[3, 1]], ea1_rest: numpy.ndarray[numpy.float64[3, 1]], eb0_rest: numpy.ndarray[numpy.float64[3, 1]], eb1_rest: numpy.ndarray[numpy.float64[3, 1]]) float ¶
Compute the threshold of the mollifier edge-edge distance.
This values is computed based on the edges at rest length.
- Parameters:¶
- ea0_rest: numpy.ndarray[numpy.float64[3, 1]]¶
The rest position of the first vertex of the first edge.
- ea1_rest: numpy.ndarray[numpy.float64[3, 1]]¶
The rest position of the second vertex of the first edge.
- eb0_rest: numpy.ndarray[numpy.float64[3, 1]]¶
The rest position of the first vertex of the second edge.
- eb1_rest: numpy.ndarray[numpy.float64[3, 1]]¶
The rest position of the second vertex of the second edge.
- Returns:¶
Threshold for edge-edge mollification.
- ipctk.edge_edge_cross_squarednorm(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) float ¶
Compute the squared norm of the edge-edge cross product.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the first edge.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the first edge.
- eb0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the second edge.
- eb1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the second edge.
- Returns:¶
The squared norm of the edge-edge cross product.
- ipctk.edge_edge_cross_squarednorm_gradient(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[12, 1]] ¶
Compute the gradient of the squared norm of the edge cross product.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the first edge.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the first edge.
- eb0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the second edge.
- eb1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the second edge.
- Returns:¶
The gradient of the squared norm of the edge cross product wrt ea0, ea1, eb0, and eb1.
- ipctk.edge_edge_cross_squarednorm_hessian(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[12, 12]] ¶
Compute the hessian of the squared norm of the edge cross product.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the first edge.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the first edge.
- eb0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the second edge.
- eb1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the second edge.
- Returns:¶
The hessian of the squared norm of the edge cross product wrt ea0, ea1, eb0, and eb1.
- ipctk.edge_edge_mollifier(*args, **kwargs)¶
Overloaded function.
edge_edge_mollifier(x: float, eps_x: float) -> float
Mollifier function for edge-edge distance.
- Parameters:
x: Squared norm of the edge-edge cross product. eps_x: Mollifier activation threshold.
- Returns:
The mollifier coefficient to premultiply the edge-edge distance.
edge_edge_mollifier(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], eps_x: float) -> float
Compute a mollifier for the edge-edge distance.
This helps smooth the non-smoothness at close to parallel edges.
- Parameters:
ea0: The first vertex of the first edge. ea1: The second vertex of the first edge. eb0: The first vertex of the second edge. eb1: The second vertex of the second edge. eps_x: Mollifier activation threshold.
- Returns:
The mollifier coefficient to premultiply the edge-edge distance.
- ipctk.edge_edge_mollifier_gradient(*args, **kwargs)¶
Overloaded function.
edge_edge_mollifier_gradient(x: float, eps_x: float) -> float
The gradient of the mollifier function for edge-edge distance.
- Parameters:
x: Squared norm of the edge-edge cross product. eps_x: Mollifier activation threshold.
- Returns:
The gradient of the mollifier function for edge-edge distance wrt x.
edge_edge_mollifier_gradient(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], eps_x: float) -> numpy.ndarray[numpy.float64[12, 1]]
Compute the gradient of the mollifier for the edge-edge distance.
- Parameters:
ea0: The first vertex of the first edge. ea1: The second vertex of the first edge. eb0: The first vertex of the second edge. eb1: The second vertex of the second edge. eps_x: Mollifier activation threshold.
- Returns:
The gradient of the mollifier.
- ipctk.edge_edge_mollifier_hessian(*args, **kwargs)¶
Overloaded function.
edge_edge_mollifier_hessian(x: float, eps_x: float) -> float
The hessian of the mollifier function for edge-edge distance.
- Parameters:
x: Squared norm of the edge-edge cross product. eps_x: Mollifier activation threshold.
- Returns:
The hessian of the mollifier function for edge-edge distance wrt x.
edge_edge_mollifier_hessian(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]], eps_x: float) -> numpy.ndarray[numpy.float64[12, 12]]
Compute the hessian of the mollifier for the edge-edge distance.
- Parameters:
ea0: The first vertex of the first edge. ea1: The second vertex of the first edge. eb0: The first vertex of the second edge. eb1: The second vertex of the second edge. eps_x: Mollifier activation threshold.
- Returns:
The hessian of the mollifier.
Line-Line¶
- ipctk.line_line_distance(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) float ¶
Compute the distance between a two infinite lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the first line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the first line.
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the second line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the second line.
- Returns:¶
The distance between the two lines.
- ipctk.line_line_distance_gradient(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[12, 1]] ¶
Compute the gradient of the distance between a two lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the first line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the first line.
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the second line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the second line.
- Returns:¶
The gradient of the distance wrt ea0, ea1, eb0, and eb1.
- ipctk.line_line_distance_hessian(ea0: numpy.ndarray[numpy.float64[3, 1]], ea1: numpy.ndarray[numpy.float64[3, 1]], eb0: numpy.ndarray[numpy.float64[3, 1]], eb1: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[12, 12]] ¶
Compute the hessian of the distance between a two lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the first line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the first line.
- ea0: numpy.ndarray[numpy.float64[3, 1]]¶
The first vertex of the edge defining the second line.
- ea1: numpy.ndarray[numpy.float64[3, 1]]¶
The second vertex of the edge defining the second line.
- Returns:¶
The hessian of the distance wrt ea0, ea1, eb0, and eb1.
Point-Edge¶
- ipctk.point_edge_distance(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]], dtype: ipctk.PointEdgeDistanceType = <PointEdgeDistanceType.AUTO: 3>) float ¶
Compute the distance between a point and edge in 2D or 3D.
Note
The distance is actually squared distance.
- ipctk.point_edge_distance_gradient(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]], dtype: ipctk.PointEdgeDistanceType = <PointEdgeDistanceType.AUTO: 3>) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the gradient of the distance between a point and edge.
Note
The distance is actually squared distance.
- ipctk.point_edge_distance_hessian(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]], dtype: ipctk.PointEdgeDistanceType = <PointEdgeDistanceType.AUTO: 3>) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the hessian of the distance between a point and edge.
Note
The distance is actually squared distance.
Point-Line¶
- ipctk.point_line_distance(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]]) float ¶
Compute the distance between a point and line in 2D or 3D.
Note
The distance is actually squared distance.
- ipctk.point_line_distance_gradient(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the gradient of the distance between a point and line.
Note
The distance is actually squared distance.
- ipctk.point_line_distance_hessian(p: numpy.ndarray[numpy.float64[m, 1]], e0: numpy.ndarray[numpy.float64[m, 1]], e1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the hessian of the distance between a point and line.
Note
The distance is actually squared distance.
Point-Plane¶
- ipctk.point_plane_distance(*args, **kwargs)¶
Overloaded function.
point_plane_distance(p: numpy.ndarray[numpy.float64[3, 1]], origin: numpy.ndarray[numpy.float64[3, 1]], normal: numpy.ndarray[numpy.float64[3, 1]]) -> float
Compute the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. origin: The origin of the plane. normal: The normal of the plane.
- Returns:
The distance between the point and plane.
point_plane_distance(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]]) -> float
Compute the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. t0: The first vertex of the triangle. t1: The second vertex of the triangle. t2: The third vertex of the triangle.
- Returns:
The distance between the point and plane.
- ipctk.point_plane_distance_gradient(*args, **kwargs)¶
Overloaded function.
point_plane_distance_gradient(p: numpy.ndarray[numpy.float64[3, 1]], origin: numpy.ndarray[numpy.float64[3, 1]], normal: numpy.ndarray[numpy.float64[3, 1]]) -> numpy.ndarray[numpy.float64[3, 1]]
Compute the gradient of the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. origin: The origin of the plane. normal: The normal of the plane.
- Returns:
The gradient of the distance wrt p.
point_plane_distance_gradient(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]]) -> numpy.ndarray[numpy.float64[12, 1]]
Compute the gradient of the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. t0: The first vertex of the triangle. t1: The second vertex of the triangle. t2: The third vertex of the triangle.
- Returns:
The gradient of the distance wrt p, t0, t1, and t2.
- ipctk.point_plane_distance_hessian(*args, **kwargs)¶
Overloaded function.
point_plane_distance_hessian(p: numpy.ndarray[numpy.float64[3, 1]], origin: numpy.ndarray[numpy.float64[3, 1]], normal: numpy.ndarray[numpy.float64[3, 1]]) -> numpy.ndarray[numpy.float64[3, 3]]
Compute the hessian of the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. origin: The origin of the plane. normal: The normal of the plane.
- Returns:
The hessian of the distance wrt p.
point_plane_distance_hessian(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]]) -> numpy.ndarray[numpy.float64[12, 12]]
Compute the hessian of the distance between a point and a plane.
- Note:
The distance is actually squared distance.
- Parameters:
p: The point. t0: The first vertex of the triangle. t1: The second vertex of the triangle. t2: The third vertex of the triangle.
- Returns:
The hessian of the distance wrt p, t0, t1, and t2.
Point-Point¶
- ipctk.point_point_distance(p0: numpy.ndarray[numpy.float64[m, 1]], p1: numpy.ndarray[numpy.float64[m, 1]]) float ¶
Compute the distance between two points.
Note
The distance is actually squared distance.
- ipctk.point_point_distance_gradient(p0: numpy.ndarray[numpy.float64[m, 1]], p1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the gradient of the distance between two points.
Note
The distance is actually squared distance.
- ipctk.point_point_distance_hessian(p0: numpy.ndarray[numpy.float64[m, 1]], p1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the hessian of the distance between two points.
Note
The distance is actually squared distance.
Point-Triangle¶
- ipctk.point_triangle_distance(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.PointTriangleDistanceType = <PointTriangleDistanceType.AUTO: 7>) float ¶
Compute the distance between a points and a triangle.
Note
The distance is actually squared distance.
- ipctk.point_triangle_distance_gradient(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.PointTriangleDistanceType = <PointTriangleDistanceType.AUTO: 7>) numpy.ndarray[numpy.float64[12, 1]] ¶
Compute the gradient of the distance between a points and a triangle.
Note
The distance is actually squared distance.
- ipctk.point_triangle_distance_hessian(p: numpy.ndarray[numpy.float64[3, 1]], t0: numpy.ndarray[numpy.float64[3, 1]], t1: numpy.ndarray[numpy.float64[3, 1]], t2: numpy.ndarray[numpy.float64[3, 1]], dtype: ipctk.PointTriangleDistanceType = <PointTriangleDistanceType.AUTO: 7>) numpy.ndarray[numpy.float64[12, 12]] ¶
Compute the hessian of the distance between a points and a triangle.
Note
The distance is actually squared distance.