Switch to Euclidean-invariant projection onto tangent space of solution variety #34

Open
Vectornaut wants to merge 4 commits from uniform-projection into main
Collaborator

This pull request addresses issues #32 and #33 by projecting nudges onto the tangent space of the solution variety using a Euclidean-invariant inner product, which I'm calling the uniform inner product.

Definition of the uniform inner product

For spheres and planes, the uniform inner product is defined on the tangent space of the hyperboloid \langle v, v \rangle = 1. For points, it's defined on the tangent space of the paraboloid \langle v, v \rangle = 0,\; \langle v, I_\infty \rangle = 1.

The tangent space of an assembly can be expressed as the direct sum of the tangent spaces of the elements. We extend the uniform inner product to assemblies by declaring the tangent spaces of different elements to be orthogonal.

For spheres and planes

If v = [x, y, z, b, c]^\top is on the hyperboloid \langle v, v \rangle = 1, the vectors

\left[ \begin{array}{c} 2b \\ \cdot \\ \cdot \\ \cdot \\ x \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ 2b \\ \cdot \\ \cdot \\ y \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ \cdot \\ 2b \\ \cdot \\ z \end{array} \right],\;\left[ \begin{array}{l} 2bx \\ 2by \\ 2bz \\ 2b^2 \\ 2bc + 1 \end{array} \right]

form a basis for the tangent space of hyperboloid at v. We declare this basis to be orthonormal with respect to the uniform inner product.

The first three vectors in the basis are unit-speed translations along the coordinate axes. The last vector moves the surface at unit speed along its normal field. For spheres, this increases the radius at unit rate. For planes, this translates the plane parallel to itself at unit speed. This description makes it clear that the uniform inner product is invariant under Euclidean motions.

For points

If v = [x, y, z, b, c]^\top is on the paraboloid \langle v, v \rangle = 0,\; \langle v, I_\infty \rangle = 1, the vectors

\left[ \begin{array}{c} 2b \\ \cdot \\ \cdot \\ \cdot \\ x \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ 2b \\ \cdot \\ \cdot \\ y \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ \cdot \\ 2b \\ \cdot \\ z \end{array} \right]

form a basis for the tangent space of paraboloid at v. We declare this basis to be orthonormal with respect to the uniform inner product.

The meanings of the basis vectors, and the argument that the uniform inner product is Euclidean-invariant, are the same as for spheres and planes. In the engine, we pad the basis with [0, 0, 0, 0, 1]^\top to keep the number of uniform coordinates consistent across element types.

This pull request addresses issues #32 and #33 by projecting nudges onto the tangent space of the solution variety using a Euclidean-invariant inner product, which I'm calling the *uniform* inner product. ### Definition of the uniform inner product For spheres and planes, the uniform inner product is defined on the tangent space of the hyperboloid $\langle v, v \rangle = 1$. For points, it's defined on the tangent space of the paraboloid $\langle v, v \rangle = 0,\; \langle v, I_\infty \rangle = 1$. The tangent space of an assembly can be expressed as the direct sum of the tangent spaces of the elements. We extend the uniform inner product to assemblies by declaring the tangent spaces of different elements to be orthogonal. #### For spheres and planes If $v = [x, y, z, b, c]^\top$ is on the hyperboloid $\langle v, v \rangle = 1$, the vectors $$\left[ \begin{array}{c} 2b \\ \cdot \\ \cdot \\ \cdot \\ x \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ 2b \\ \cdot \\ \cdot \\ y \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ \cdot \\ 2b \\ \cdot \\ z \end{array} \right],\;\left[ \begin{array}{l} 2bx \\ 2by \\ 2bz \\ 2b^2 \\ 2bc + 1 \end{array} \right]$$ form a basis for the tangent space of hyperboloid at $v$. We declare this basis to be orthonormal with respect to the uniform inner product. The first three vectors in the basis are unit-speed translations along the coordinate axes. The last vector moves the surface at unit speed along its normal field. For spheres, this increases the radius at unit rate. For planes, this translates the plane parallel to itself at unit speed. This description makes it clear that the uniform inner product is invariant under Euclidean motions. #### For points If $v = [x, y, z, b, c]^\top$ is on the paraboloid $\langle v, v \rangle = 0,\; \langle v, I_\infty \rangle = 1$, the vectors $$\left[ \begin{array}{c} 2b \\ \cdot \\ \cdot \\ \cdot \\ x \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ 2b \\ \cdot \\ \cdot \\ y \end{array} \right],\;\left[ \begin{array}{c} \cdot \\ \cdot \\ 2b \\ \cdot \\ z \end{array} \right]$$ form a basis for the tangent space of paraboloid at $v$. We declare this basis to be orthonormal with respect to the uniform inner product. The meanings of the basis vectors, and the argument that the uniform inner product is Euclidean-invariant, are the same as for spheres and planes. In the engine, we pad the basis with $[0, 0, 0, 0, 1]^\top$ to keep the number of uniform coordinates consistent across element types.
Vectornaut added 2 commits 2025-01-22 03:57:35 +00:00
This projection should be invariant under Euclidean motions. For now, we
assume that all of the elements are spheres.
Vectornaut added 2 commits 2025-01-22 03:57:50 +00:00
In the previous commit, the nudge was written in standard coordinates,
so the example shouldn't have worked. However, by sheer dumb luck, the
standard and uniform coordinates match for this particular nudge. In
fact, the expression used before to get the standard coordinates may
even produce equivalent floating point values as the expression used
here to get the uniform coordinates. That would explain why the example
prints exactly the same output in this commit.
Instead of finding the kernel in the standard coordinates and then
expressing it in the projection coordinates, work in the projection
coordinates from the beginning by applying a change of basis to the
input matrix.
Owner

I see there were two batches of commits. Is this PR ready for review? Does this inner product seem to provide all of our nudging desiderata, or is it a tradeoff? If so, what are the pros and cons? I mean, I assume one main pro is that translating and nudging now commute, correct? Do we have an explicit unit test to examine that commutativity?

I see there were two batches of commits. Is this PR ready for review? Does this inner product seem to provide all of our nudging desiderata, or is it a tradeoff? If so, what are the pros and cons? I mean, I assume one main pro is that translating and nudging now commute, correct? Do we have an explicit unit test to examine that commutativity?
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin uniform-projection:uniform-projection
git checkout uniform-projection
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: glen/dyna3#34
No description provided.