Friction¶
Friction Collisions¶
- class ipctk.FrictionCollisions¶
Bases:
pybind11_object
Public Data Attributes:
Public Methods:
__init__
(self)build
(*args, **kwargs)Overloaded function.
__len__
(self)Get the number of friction collisions.
empty
(self)Get if the friction collisions are empty.
clear
(self)Clear the friction collisions.
__getitem__
(self, i)Get a reference to collision at index i.
default_blend_mu
(mu0, mu1)Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(self)¶
- __len__(self) int ¶
Get the number of friction collisions.
-
__module__ =
'ipctk'
¶
- build(*args, **kwargs)¶
Overloaded function.
build(self: ipctk.FrictionCollisions, mesh: ipc::CollisionMesh, vertices: numpy.ndarray[numpy.float64[m, n]], collisions: ipctk.Collisions, barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float, mu: float) -> None
build(self: ipctk.FrictionCollisions, mesh: ipc::CollisionMesh, vertices: numpy.ndarray[numpy.float64[m, n]], collisions: ipctk.Collisions, barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float, mus: numpy.ndarray[numpy.float64[m, 1]]) -> None
build(self: ipctk.FrictionCollisions, mesh: ipc::CollisionMesh, vertices: numpy.ndarray[numpy.float64[m, n]], collisions: ipctk.Collisions, barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float, mus: numpy.ndarray[numpy.float64[m, 1]], blend_mu: Callable[[float, float], float]) -> None
- clear(self) None ¶
Clear the friction collisions.
- static default_blend_mu(mu0: float, mu1: float) float ¶
- property ee_collisions : list[ipc::EdgeEdgeFrictionCollision]¶
- empty(self) bool ¶
Get if the friction collisions are empty.
- property ev_collisions : list[ipc::EdgeVertexFrictionCollision]¶
- property fv_collisions : list[ipc::FaceVertexFrictionCollision]¶
- property vv_collisions : list[ipc::VertexVertexFrictionCollision]¶
-
__annotations__ =
Friction Collision¶
- class ipctk.FrictionCollision¶
Bases:
CollisionStencil
Public Data Attributes:
Collision force magnitude
Coefficient of friction
Weight
Gradient of weight with respect to all DOF
Barycentric coordinates of the closest point(s)
Tangent basis of the collision (max size 3×2)
Public Methods:
__init__
(*args, **kwargs)dim
(self)Get the dimension of the collision.
ndof
(self)Get the number of degrees of freedom for the collision.
compute_normal_force_magnitude
(self, ...[, dmin])Compute the normal force magnitude.
Compute the gradient of the normal force magnitude.
compute_tangent_basis
(self, positions)Compute the tangent basis of the collision.
compute_tangent_basis_jacobian
(self, positions)Compute the Jacobian of the tangent basis of the collision.
compute_closest_point
(self, positions)Compute the barycentric coordinates of the closest point.
compute_closest_point_jacobian
(self, positions)Compute the Jacobian of the barycentric coordinates of the closest point.
relative_velocity
(self, velocities)Compute the relative velocity of the collision.
relative_velocity_matrix
(*args, **kwargs)Overloaded function.
relative_velocity_matrix_jacobian
(self, ...)Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
Inherited from
CollisionStencil
__init__
(*args, **kwargs)num_vertices
(self)Get the number of vertices in the collision stencil.
dim
(self, ndof)Get the dimension of the collision stencil.
vertex_ids
(self, edges, faces)Get the vertex IDs of the collision stencil.
vertices
(self, vertices, edges, faces)Get the vertex attributes of the collision stencil.
dof
(self, X, edges, faces)Select this stencil's DOF from the full matrix of DOF.
compute_distance
(self, positions)Compute the distance of the stencil.
compute_distance_gradient
(self, positions)Compute the distance gradient of the stencil w.r.t.
compute_distance_hessian
(self, positions)Compute the distance Hessian of the stencil w.r.t.
Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(*args, **kwargs)¶
-
__module__ =
'ipctk'
¶
- property closest_point : numpy.ndarray[numpy.float64[m, 1]]¶
Barycentric coordinates of the closest point(s)
- compute_closest_point(self, positions: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the barycentric coordinates of the closest point.
- compute_closest_point_jacobian(self, positions: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the Jacobian of the barycentric coordinates of the closest point.
-
compute_normal_force_magnitude(self, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float, dmin: float =
0
) float ¶ Compute the normal force magnitude.
-
compute_normal_force_magnitude_gradient(self, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float, dmin: float =
0
) numpy.ndarray[numpy.float64[m, 1]] ¶ Compute the gradient of the normal force magnitude.
- compute_tangent_basis(self, positions: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the tangent basis of the collision.
- compute_tangent_basis_jacobian(self, positions: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the Jacobian of the tangent basis of the collision.
- dim(self) int ¶
Get the dimension of the collision.
- property mu : float¶
Coefficient of friction
- ndof(self) int ¶
Get the number of degrees of freedom for the collision.
- property normal_force_magnitude : float¶
Collision force magnitude
- relative_velocity(self, velocities: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the relative velocity of the collision.
- relative_velocity_matrix(*args, **kwargs)¶
Overloaded function.
relative_velocity_matrix(self: ipctk.FrictionCollision) -> numpy.ndarray[numpy.float64[m, n]]
Construct the premultiplier matrix for the relative velocity.
- Note:
Uses the cached closest point.
- Returns:
A matrix M such that relative_velocity = M * velocities.
relative_velocity_matrix(self: ipctk.FrictionCollision, closest_point: numpy.ndarray[numpy.float64[m, 1]]) -> numpy.ndarray[numpy.float64[m, n]]
Construct the premultiplier matrix for the relative velocity.
- Parameters:
closest_point: Barycentric coordinates of the closest point.
- Returns:
A matrix M such that relative_velocity = M * velocities.
- relative_velocity_matrix_jacobian(self, closest_point: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
- property tangent_basis : numpy.ndarray[numpy.float64[m, n]]¶
Tangent basis of the collision (max size 3×2)
- property weight : float¶
Weight
- property weight_gradient : scipy.sparse.csc_matrix[numpy.float64]¶
Gradient of weight with respect to all DOF
-
__annotations__ =
Vertex-Vertex Friction Collision¶
- class ipctk.VertexVertexFrictionCollision¶
Bases:
VertexVertexCandidate
,FrictionCollision
Public Data Attributes:
Inherited from
VertexVertexCandidate
ID of the first vertex
ID of the second vertex
Inherited from
FrictionCollision
Collision force magnitude
Coefficient of friction
Weight
Gradient of weight with respect to all DOF
Barycentric coordinates of the closest point(s)
Tangent basis of the collision (max size 3×2)
Public Methods:
__init__
(*args, **kwargs)Overloaded function.
Inherited from
VertexVertexCandidate
__init__
(self, vertex0_id, vertex1_id)__str__
(self)__repr__
(self)__eq__
(self, other)__ne__
(self, other)__lt__
(self, other)Compare EdgeVertexCandidates for sorting.
Inherited from
FrictionCollision
__init__
(*args, **kwargs)dim
(self)Get the dimension of the collision.
ndof
(self)Get the number of degrees of freedom for the collision.
compute_normal_force_magnitude
(self, ...[, dmin])Compute the normal force magnitude.
Compute the gradient of the normal force magnitude.
compute_tangent_basis
(self, positions)Compute the tangent basis of the collision.
compute_tangent_basis_jacobian
(self, positions)Compute the Jacobian of the tangent basis of the collision.
compute_closest_point
(self, positions)Compute the barycentric coordinates of the closest point.
compute_closest_point_jacobian
(self, positions)Compute the Jacobian of the barycentric coordinates of the closest point.
relative_velocity
(self, velocities)Compute the relative velocity of the collision.
relative_velocity_matrix
(*args, **kwargs)Overloaded function.
relative_velocity_matrix_jacobian
(self, ...)Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
Inherited from
CollisionStencil
__init__
(*args, **kwargs)num_vertices
(self)Get the number of vertices in the collision stencil.
dim
(self, ndof)Get the dimension of the collision stencil.
vertex_ids
(self, edges, faces)Get the vertex IDs of the collision stencil.
vertices
(self, vertices, edges, faces)Get the vertex attributes of the collision stencil.
dof
(self, X, edges, faces)Select this stencil's DOF from the full matrix of DOF.
compute_distance
(self, positions)Compute the distance of the stencil.
compute_distance_gradient
(self, positions)Compute the distance gradient of the stencil w.r.t.
compute_distance_hessian
(self, positions)Compute the distance Hessian of the stencil w.r.t.
Inherited from
ContinuousCollisionCandidate
__init__
(*args, **kwargs)ccd
(self, vertices_t0, 1]], vertices_t1, ...)Perform narrow-phase CCD on the candidate.
print_ccd_query
(self, vertices_t0, vertices_t1)Print the CCD query to cout.
Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: ipctk.VertexVertexFrictionCollision, collision: ipctk.VertexVertexCollision) -> None
__init__(self: ipctk.VertexVertexFrictionCollision, collision: ipctk.VertexVertexCollision, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float) -> None
-
__module__ =
'ipctk'
¶
-
__annotations__ =
Edge-Vertex Friction Collision¶
- class ipctk.EdgeVertexFrictionCollision¶
Bases:
EdgeVertexCandidate
,FrictionCollision
Public Data Attributes:
Inherited from
EdgeVertexCandidate
ID of the edge
ID of the vertex
Inherited from
FrictionCollision
Collision force magnitude
Coefficient of friction
Weight
Gradient of weight with respect to all DOF
Barycentric coordinates of the closest point(s)
Tangent basis of the collision (max size 3×2)
Public Methods:
__init__
(*args, **kwargs)Overloaded function.
Inherited from
EdgeVertexCandidate
__init__
(self, edge_id, vertex_id)known_dtype
(self)__str__
(self)__repr__
(self)__eq__
(self, other)__ne__
(self, other)__lt__
(self, other)Compare EdgeVertexCandidates for sorting.
Inherited from
FrictionCollision
__init__
(*args, **kwargs)dim
(self)Get the dimension of the collision.
ndof
(self)Get the number of degrees of freedom for the collision.
compute_normal_force_magnitude
(self, ...[, dmin])Compute the normal force magnitude.
Compute the gradient of the normal force magnitude.
compute_tangent_basis
(self, positions)Compute the tangent basis of the collision.
compute_tangent_basis_jacobian
(self, positions)Compute the Jacobian of the tangent basis of the collision.
compute_closest_point
(self, positions)Compute the barycentric coordinates of the closest point.
compute_closest_point_jacobian
(self, positions)Compute the Jacobian of the barycentric coordinates of the closest point.
relative_velocity
(self, velocities)Compute the relative velocity of the collision.
relative_velocity_matrix
(*args, **kwargs)Overloaded function.
relative_velocity_matrix_jacobian
(self, ...)Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
Inherited from
CollisionStencil
__init__
(*args, **kwargs)num_vertices
(self)Get the number of vertices in the collision stencil.
dim
(self, ndof)Get the dimension of the collision stencil.
vertex_ids
(self, edges, faces)Get the vertex IDs of the collision stencil.
vertices
(self, vertices, edges, faces)Get the vertex attributes of the collision stencil.
dof
(self, X, edges, faces)Select this stencil's DOF from the full matrix of DOF.
compute_distance
(self, positions)Compute the distance of the stencil.
compute_distance_gradient
(self, positions)Compute the distance gradient of the stencil w.r.t.
compute_distance_hessian
(self, positions)Compute the distance Hessian of the stencil w.r.t.
Inherited from
ContinuousCollisionCandidate
__init__
(*args, **kwargs)ccd
(self, vertices_t0, 1]], vertices_t1, ...)Perform narrow-phase CCD on the candidate.
print_ccd_query
(self, vertices_t0, vertices_t1)Print the CCD query to cout.
Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: ipctk.EdgeVertexFrictionCollision, collision: ipctk.EdgeVertexCollision) -> None
__init__(self: ipctk.EdgeVertexFrictionCollision, collision: ipctk.EdgeVertexCollision, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float) -> None
-
__module__ =
'ipctk'
¶
-
__annotations__ =
Edge-Edge Friction Collision¶
- class ipctk.EdgeEdgeFrictionCollision¶
Bases:
EdgeEdgeCandidate
,FrictionCollision
Public Data Attributes:
Inherited from
EdgeEdgeCandidate
ID of the first edge.
ID of the second edge.
Inherited from
FrictionCollision
Collision force magnitude
Coefficient of friction
Weight
Gradient of weight with respect to all DOF
Barycentric coordinates of the closest point(s)
Tangent basis of the collision (max size 3×2)
Public Methods:
__init__
(*args, **kwargs)Overloaded function.
Inherited from
EdgeEdgeCandidate
__init__
(self, edge0_id, edge1_id)known_dtype
(self)__str__
(self)__repr__
(self)__eq__
(self, other)__ne__
(self, other)__lt__
(self, other)Compare EdgeEdgeCandidates for sorting.
Inherited from
FrictionCollision
__init__
(*args, **kwargs)dim
(self)Get the dimension of the collision.
ndof
(self)Get the number of degrees of freedom for the collision.
compute_normal_force_magnitude
(self, ...[, dmin])Compute the normal force magnitude.
Compute the gradient of the normal force magnitude.
compute_tangent_basis
(self, positions)Compute the tangent basis of the collision.
compute_tangent_basis_jacobian
(self, positions)Compute the Jacobian of the tangent basis of the collision.
compute_closest_point
(self, positions)Compute the barycentric coordinates of the closest point.
compute_closest_point_jacobian
(self, positions)Compute the Jacobian of the barycentric coordinates of the closest point.
relative_velocity
(self, velocities)Compute the relative velocity of the collision.
relative_velocity_matrix
(*args, **kwargs)Overloaded function.
relative_velocity_matrix_jacobian
(self, ...)Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
Inherited from
CollisionStencil
__init__
(*args, **kwargs)num_vertices
(self)Get the number of vertices in the collision stencil.
dim
(self, ndof)Get the dimension of the collision stencil.
vertex_ids
(self, edges, faces)Get the vertex IDs of the collision stencil.
vertices
(self, vertices, edges, faces)Get the vertex attributes of the collision stencil.
dof
(self, X, edges, faces)Select this stencil's DOF from the full matrix of DOF.
compute_distance
(self, positions)Compute the distance of the stencil.
compute_distance_gradient
(self, positions)Compute the distance gradient of the stencil w.r.t.
compute_distance_hessian
(self, positions)Compute the distance Hessian of the stencil w.r.t.
Inherited from
ContinuousCollisionCandidate
__init__
(*args, **kwargs)ccd
(self, vertices_t0, 1]], vertices_t1, ...)Perform narrow-phase CCD on the candidate.
print_ccd_query
(self, vertices_t0, vertices_t1)Print the CCD query to cout.
Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: ipctk.EdgeEdgeFrictionCollision, collision: ipctk.EdgeEdgeCollision) -> None
__init__(self: ipctk.EdgeEdgeFrictionCollision, collision: ipctk.EdgeEdgeCollision, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float) -> None
-
__module__ =
'ipctk'
¶
-
__annotations__ =
Triangle-Vertex Friction Collision¶
- class ipctk.FaceVertexFrictionCollision¶
Bases:
FaceVertexCandidate
,FrictionCollision
Public Data Attributes:
Inherited from
FaceVertexCandidate
ID of the face
ID of the vertex
Inherited from
FrictionCollision
Collision force magnitude
Coefficient of friction
Weight
Gradient of weight with respect to all DOF
Barycentric coordinates of the closest point(s)
Tangent basis of the collision (max size 3×2)
Public Methods:
__init__
(*args, **kwargs)Overloaded function.
Inherited from
FaceVertexCandidate
__init__
(self, face_id, vertex_id)known_dtype
(self)__str__
(self)__repr__
(self)__eq__
(self, other)__ne__
(self, other)__lt__
(self, other)Compare FaceVertexCandidate for sorting.
Inherited from
FrictionCollision
__init__
(*args, **kwargs)dim
(self)Get the dimension of the collision.
ndof
(self)Get the number of degrees of freedom for the collision.
compute_normal_force_magnitude
(self, ...[, dmin])Compute the normal force magnitude.
Compute the gradient of the normal force magnitude.
compute_tangent_basis
(self, positions)Compute the tangent basis of the collision.
compute_tangent_basis_jacobian
(self, positions)Compute the Jacobian of the tangent basis of the collision.
compute_closest_point
(self, positions)Compute the barycentric coordinates of the closest point.
compute_closest_point_jacobian
(self, positions)Compute the Jacobian of the barycentric coordinates of the closest point.
relative_velocity
(self, velocities)Compute the relative velocity of the collision.
relative_velocity_matrix
(*args, **kwargs)Overloaded function.
relative_velocity_matrix_jacobian
(self, ...)Construct the Jacobian of the relative velocity premultiplier wrt the closest points.
Inherited from
CollisionStencil
__init__
(*args, **kwargs)num_vertices
(self)Get the number of vertices in the collision stencil.
dim
(self, ndof)Get the dimension of the collision stencil.
vertex_ids
(self, edges, faces)Get the vertex IDs of the collision stencil.
vertices
(self, vertices, edges, faces)Get the vertex attributes of the collision stencil.
dof
(self, X, edges, faces)Select this stencil's DOF from the full matrix of DOF.
compute_distance
(self, positions)Compute the distance of the stencil.
compute_distance_gradient
(self, positions)Compute the distance gradient of the stencil w.r.t.
compute_distance_hessian
(self, positions)Compute the distance Hessian of the stencil w.r.t.
Inherited from
ContinuousCollisionCandidate
__init__
(*args, **kwargs)ccd
(self, vertices_t0, 1]], vertices_t1, ...)Perform narrow-phase CCD on the candidate.
print_ccd_query
(self, vertices_t0, vertices_t1)Print the CCD query to cout.
Inherited from
pybind11_object
-
__annotations__ =
{}
¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: ipctk.FaceVertexFrictionCollision, collision: ipctk.FaceVertexCollision) -> None
__init__(self: ipctk.FaceVertexFrictionCollision, collision: ipctk.FaceVertexCollision, positions: numpy.ndarray[numpy.float64[m, 1]], barrier_potential: ipctk.BarrierPotential, barrier_stiffness: float) -> None
-
__module__ =
'ipctk'
¶
-
__annotations__ =
Smooth Mollifier¶
- ipctk.f0_SF(s: float, epsv: float) float ¶
Smooth friction mollifier function.
\[f_0(s)= \begin{cases} -\frac{s^3}{3\epsilon_v^2} + \frac{s^2}{\epsilon_v} + \frac{\epsilon_v}{3}, & |s| < \epsilon_v \newline s, & |s| \geq \epsilon_v \end{cases}\]
- ipctk.f1_SF_over_x(s: float, epsv: float) float ¶
Compute the derivative of f0_SF divided by s (\(\frac{f_0'(s)}{s}\)).
\[f_1(s) = f_0'(s) = \begin{cases} -\frac{s^2}{\epsilon_v^2}+\frac{2 s}{\epsilon_v}, & |s| < \epsilon_v \newline 1, & |s| \geq \epsilon_v \end{cases}\]\[\frac{f_1(s)}{s} = \begin{cases} -\frac{s}{\epsilon_v^2}+\frac{2}{\epsilon_v}, & |s| < \epsilon_v \newline \frac{1}{s}, & |s| \geq \epsilon_v \end{cases}\]
- ipctk.df1_x_minus_f1_over_x3(s: float, epsv: float) float ¶
The derivative of f1 times s minus f1 all divided by s cubed.
\[\frac{f_1'(s) s - f_1(s)}{s^3} = \begin{cases} -\frac{1}{s \epsilon_v^2}, & |s| < \epsilon_v \newline -\frac{1}{s^3}, & |s| \geq \epsilon_v \end{cases}\]
Normal Force Magnitude¶
-
ipctk.compute_normal_force_magnitude(distance_squared: float, barrier: ipctk.Barrier, dhat: float, barrier_stiffness: float, dmin: float =
0
) float ¶
-
ipctk.compute_normal_force_magnitude_gradient(distance_squared: float, distance_squared_gradient: numpy.ndarray[numpy.float64[m, 1]], barrier: ipctk.Barrier, dhat: float, barrier_stiffness: float, dmin: float =
0
) numpy.ndarray[numpy.float64[m, 1]] ¶
Tangent Basis¶
- ipctk.point_point_tangent_basis(p0: numpy.ndarray[numpy.float64[m, 1]], p1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Compute a basis for the space tangent to the point-point pair.
- ipctk.point_edge_tangent_basis(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]] ¶
- ipctk.edge_edge_tangent_basis(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[3, 2]] ¶
Compute a basis for the space tangent to the edge-edge pair.
- ipctk.point_triangle_tangent_basis(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[3, 2]] ¶
Compute a basis for the space tangent to the point-triangle pair.
\[\begin{bmatrix} \frac{t_1 - t_0}{\|t_1 - t_0\|} & \frac{((t_1 - t_0)\times(t_2 - t_0)) \times(t_1 - t_0)}{\|((t_1 - t_0)\times(t_2 - t_0))\times(t_1 - t_0)\|} \end{bmatrix}\]
Tangent Basis Jacobians¶
- ipctk.point_point_tangent_basis_jacobian(p0: numpy.ndarray[numpy.float64[m, 1]], p1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
- ipctk.point_edge_tangent_basis_jacobian(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]] ¶
- ipctk.edge_edge_tangent_basis_jacobian(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[36, 2]] ¶
- ipctk.point_triangle_tangent_basis_jacobian(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[36, 2]] ¶
Relative Velocity¶
- ipctk.point_point_relative_velocity(dp0: numpy.ndarray[numpy.float64[m, 1]], dp1: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the relative velocity of two points
- ipctk.point_edge_relative_velocity(dp: numpy.ndarray[numpy.float64[m, 1]], de0: numpy.ndarray[numpy.float64[m, 1]], de1: numpy.ndarray[numpy.float64[m, 1]], alpha: float) numpy.ndarray[numpy.float64[m, 1]] ¶
Compute the relative velocity of a point and an edge
- ipctk.edge_edge_relative_velocity(dea0: numpy.ndarray[numpy.float64[3, 1]], dea1: numpy.ndarray[numpy.float64[3, 1]], deb0: numpy.ndarray[numpy.float64[3, 1]], deb1: numpy.ndarray[numpy.float64[3, 1]], coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[3, 1]] ¶
Compute the relative velocity of the edges.
- Parameters:¶
- dea0: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the first endpoint of the first edge
- dea1: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the second endpoint of the first edge
- deb0: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the first endpoint of the second edge
- deb1: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the second endpoint of the second edge
- coords: numpy.ndarray[numpy.float64[2, 1]]¶
Two parametric coordinates of the closest points on the edges
- Returns:¶
The relative velocity of the edges
- ipctk.point_triangle_relative_velocity(dp: numpy.ndarray[numpy.float64[3, 1]], dt0: numpy.ndarray[numpy.float64[3, 1]], dt1: numpy.ndarray[numpy.float64[3, 1]], dt2: numpy.ndarray[numpy.float64[3, 1]], coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[3, 1]] ¶
Compute the relative velocity of the point to the triangle.
- Parameters:¶
- dp: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the point
- dt0: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the first vertex of the triangle
- dt1: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the second vertex of the triangle
- dt2: numpy.ndarray[numpy.float64[3, 1]]¶
Velocity of the third vertex of the triangle
- coords: numpy.ndarray[numpy.float64[2, 1]]¶
Baricentric coordinates of the closest point on the triangle
- Returns:¶
The relative velocity of the point to the triangle
Relative Velocity as Multiplier Matricies¶
- ipctk.point_point_relative_velocity_matrix(dim: int) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the relative velocity premultiplier matrix
- ipctk.point_edge_relative_velocity_matrix(dim: int, alpha: float) numpy.ndarray[numpy.float64[m, n]] ¶
- ipctk.edge_edge_relative_velocity_matrix(dim: int, coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
- ipctk.point_triangle_relative_velocity_matrix(dim: int, coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
Relative Velocity Matrix Jacobians¶
- ipctk.point_point_relative_velocity_matrix_jacobian(dim: int) numpy.ndarray[numpy.float64[m, n]] ¶
Compute the jacobian of the relative velocity premultiplier matrix
- ipctk.point_edge_relative_velocity_matrix_jacobian(dim: int, alpha: float) numpy.ndarray[numpy.float64[m, n]] ¶
- ipctk.edge_edge_relative_velocity_matrix_jacobian(dim: int, coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶
- ipctk.point_triangle_relative_velocity_matrix_jacobian(dim: int, coords: numpy.ndarray[numpy.float64[2, 1]]) numpy.ndarray[numpy.float64[m, n]] ¶