Directional#
This module allows us to work with discrete vector and frame fields. The name is a reference to Amir Vaxman’s award-winning library which partially served as inspiration for this module.
We support two types of directional fields:
n-RoSy (\(n\) rotationally symmetric) fields, sometimes also known as power fields. These represent fields as the roots of a complex number.
Frame fields consisting of 2 directions per field element. These are represented as the coefficients of a polyvector field.
Frame Fields#
Frame fields the represented as the roots of the 4th order complex polynomial. For each face, we store two coefficients, \(c_2\) and \(c_0\), which go into the polynomial:
This polynomial will have four roots consisting of two symmetric pairs of vectors. We store such a polynomial as a tensor where the last dimension contains \((c_2, c_0)\) in that order.
Oftentimes, it is useful to prescribe one of the roots of this polynomial. We do so via the method of Meekes and Vaxman, 2021 (Appendix A). Concretely, given a symmetric 2-direction field \(\bar u = u^2\), where \(u\) is one of the two symmetric vectors along said direction, we can pull the root term \((z^2 - u^2)\) out of the polynomial \(p\). Define \(\bar z = z^2\), we have:
We can express the coefficients \(c_i\) in terms of \(u\) and \(v\) as:
So, having specified a \(u\), we can map back and forth from \(v^2\) and the full coefficients via:
iskra.directional#
|
Compute the nth roots of a complex number z. |
|
Construct the face-based connection differetial for an N-RoSy field. |
|
Construct the face-based connection laplacian for an N-RoSy field. |
|
Makes the face-based connection mass matrix for an N-RoSy field via edge lengths. |
|
Construct a tangent bundle for a face-based vector field. |
|
Smooth a frame field with sparse hard constraints. |
|
Smooths an N-RoSy field. |
|
Reconstructs 3D vector from intrinsic complex directional. |
|
Reconstructs 3D vectors from complex frame field. |
|
Reconstructs 3D vectors from intrinsic complex N-RoSy field. |
|
Projects 3D vector onto 2D basis spanned by |
|
Constructs a frame field from two 3D vectors. |
|
Constructs an N-RoSy field from a 3D vector. |
|
Parallelly transports of a vector from face source to all neighboring faces. |