My earlier derivation of the constant-length energy function was flawed, because it pooled the individual lengths before comparing them to the pooled index-spacing. Thus, this energy function enforces the sum of squared lengths but not the individual lengths. Chalk it up to trying to be too clever in avoiding a square root.
In what follows, I derive a new energy function and its gradient. The Jacobians of μ and z are re-used from the earlier treatment.
Let μ be the maximum posterior curve, given an index set, x, arranged as a single column in "xyzxyz" format. Let μ(3) be the 3 by N/3 matrix obtained by rearranging the points of μ into column vectors. That is, the i-th column μ(3)i is the i-th reconstructed point.
Let η be the vector of absolute distances between adjacent points in mu3. Formally, ηi=‖μ(3)i−μ(3)i−1‖.
The constant width energy function is defined as
Gradient is given by
where Jz is the Jacobian of z w.r.t. x.
The Jacobian of z and μ are derived in this earlier post. It remains to find the Jacobian of η.
The Jacobian of η can then be given by