Tangent¶
Tangent Basis¶
-
MatrixMax<double, 3, 2> ipc::point_point_tangent_basis(
Eigen::ConstRef<VectorMax3d> p0,
Eigen::ConstRef<VectorMax3d> p1);¶ Compute a basis for the space tangent to the point-point pair.
-
MatrixMax<double, 3, 2> ipc::point_edge_tangent_basis(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute a basis for the space tangent to the point-edge pair.
-
Eigen::Matrix<double, 3, 2> ipc::edge_edge_tangent_basis(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute a basis for the space tangent to the edge-edge pair.
-
Eigen::Matrix<double, 3, 2> ipc::point_triangle_tangent_basis(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2);¶ 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¶
-
MatrixMax<double, 18, 2> ipc::point_point_tangent_basis_jacobian(
Eigen::ConstRef<VectorMax3d> p0,
Eigen::ConstRef<VectorMax3d> p1);¶ Compute the Jacobian of the tangent basis for the point-point pair.
-
MatrixMax<double, 27, 2> ipc::point_edge_tangent_basis_jacobian(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the Jacobian of the tangent basis for the point-edge pair.
-
Eigen::Matrix<double, 36, 2> ipc::edge_edge_tangent_basis_jacobian(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the Jacobian of the tangent basis for the edge-edge pair.
-
Eigen::Matrix<double, 36, 2>
ipc::point_triangle_tangent_basis_jacobian(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2);¶ Compute the Jacobian of the tangent basis for the point-triangle pair.
Relative Velocity¶
-
VectorMax3d ipc::point_point_relative_velocity(
Eigen::ConstRef<VectorMax3d> dp0,
Eigen::ConstRef<VectorMax3d> dp1);¶ Compute the relative velocity of two points.
-
VectorMax3d ipc::point_edge_relative_velocity(
Eigen::ConstRef<VectorMax3d> dp,
Eigen::ConstRef<VectorMax3d> de0,
Eigen::ConstRef<VectorMax3d> de1, const double alpha);¶ Compute the relative velocity of a point and an edge.
-
Eigen::Vector3d ipc::edge_edge_relative_velocity(
Eigen::ConstRef<Eigen::Vector3d> dea0,
Eigen::ConstRef<Eigen::Vector3d> dea1,
Eigen::ConstRef<Eigen::Vector3d> deb0,
Eigen::ConstRef<Eigen::Vector3d> deb1,
Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the relative velocity of the edges.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> dea0¶
Velocity of the first endpoint of the first edge
- Eigen::ConstRef<Eigen::Vector3d> dea1¶
Velocity of the second endpoint of the first edge
- Eigen::ConstRef<Eigen::Vector3d> deb0¶
Velocity of the first endpoint of the second edge
- Eigen::ConstRef<Eigen::Vector3d> deb1¶
Velocity of the second endpoint of the second edge
- Eigen::ConstRef<Eigen::Vector2d> coords¶
Two parametric coordinates of the closest points on the edges
- Returns:¶
The relative velocity of the edges
-
Eigen::Vector3d ipc::point_triangle_relative_velocity(
Eigen::ConstRef<Eigen::Vector3d> dp,
Eigen::ConstRef<Eigen::Vector3d> dt0,
Eigen::ConstRef<Eigen::Vector3d> dt1,
Eigen::ConstRef<Eigen::Vector3d> dt2,
Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the relative velocity of the point to the triangle.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> dp¶
Velocity of the point
- Eigen::ConstRef<Eigen::Vector3d> dt0¶
Velocity of the first vertex of the triangle
- Eigen::ConstRef<Eigen::Vector3d> dt1¶
Velocity of the second vertex of the triangle
- Eigen::ConstRef<Eigen::Vector3d> dt2¶
Velocity of the third vertex of the triangle
- Eigen::ConstRef<Eigen::Vector2d> coords¶
Baricentric coordinates of the closest point on the triangle
- Returns:¶
The relative velocity of the point to the triangle
Relative Velocity as Multiplier Matricies¶
-
MatrixMax<double, 3, 6> ipc::point_point_relative_velocity_matrix(
const int dim);¶ Compute the point-point relative velocity premultiplier matrix.
-
MatrixMax<double, 3, 9> ipc::point_edge_relative_velocity_matrix(
const int dim, const double alpha);¶ Compute the point-edge relative velocity premultiplier matrix.
-
MatrixMax<double, 3, 12> ipc::edge_edge_relative_velocity_matrix(
const int dim, Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the edge-edge relative velocity matrix.
-
MatrixMax<double, 3, 12>
ipc::point_triangle_relative_velocity_matrix(
const int dim, Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the point-triangle relative velocity matrix.
Relative Velocity Matrix Jacobians¶
-
MatrixMax<double, 3, 6>
ipc::point_point_relative_velocity_matrix_jacobian(const int dim);¶ Compute the Jacobian of the relative velocity premultiplier matrix.
-
MatrixMax<double, 3, 9>
ipc::point_edge_relative_velocity_matrix_jacobian(
const int dim, const double alpha);¶ Compute the Jacobian of the relative velocity premultiplier matrix.
-
MatrixMax<double, 6, 12>
ipc::edge_edge_relative_velocity_matrix_jacobian(
const int dim, Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the Jacobian of the edge-edge relative velocity matrix.
-
MatrixMax<double, 6, 12>
ipc::point_triangle_relative_velocity_matrix_jacobian(
const int dim, Eigen::ConstRef<Eigen::Vector2d> coords);¶ Compute the Jacobian of the point-triangle relative velocity matrix.
Closet Points¶
-
double ipc::point_edge_closest_point(Eigen::ConstRef<VectorMax3d> p,
Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the baricentric coordinate of the closest point on the edge.
-
Eigen::Vector2d ipc::edge_edge_closest_point(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the barycentric coordinates of the closest points between two edges.
-
Eigen::Vector2d ipc::point_triangle_closest_point(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2);¶ Compute the barycentric coordinates of the closest point on the triangle.
Closet Points Jacobians¶
-
VectorMax9d ipc::point_edge_closest_point_jacobian(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the Jacobian of the closest point on the edge.
-
Eigen::Matrix<double, 2, 12> ipc::edge_edge_closest_point_jacobian(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the Jacobian of the closest points between two edges.