Open stla opened 3 years ago
I'm not sure if you are aware of that, but I'm also the author of the splines
module.
In fact, this quaternion-nursery
is a collection of notes and experiments that I have used as preparation for creating the "rotation" section of the splines
project.
But you are right, I should probably mention that in the README ...
BTW, I'm glad you like the "constant speed adapter"!
I've just updated the README, I hope the situation is now clearer.
Ah that's you lol. OK. Here is a Hopf Torus filmed by a camera following a spherical curve at constant speed. I implemented this in R but this is slow.
I implemented this in R but this is slow.
What is slow? Evaluating the spline or the whole 3D rendering?
Evaluating the spline, with the root finder and the integral.
I'm not sure which spline type you are using, but if you are using BarryGoldman
(as shown in https://splines.readthedocs.io/en/latest/rotation/barry-goldman.html#Constant-Angular-Speed), this is known to be very slow. You should use DeCasteljau
instead, which gives very similar results and is much faster for calculating constant angular speed.
If you are already using DeCasteljau
there are certainly still options for optimization. The splines
library is very much not optimized at all. Both the root finding and the integration can certainly be optimized. I just took the first functions that I found in SciPy which did what I wanted. I'm sure there are more optimized algorithms available.
I'm using Kochanek-Bartels because it has some parameters. I made a JavaScript application these days: HopfApplication which uses this algorithm (that I reimplemented in JS).
Hello,
Thank you for this repo, it is nice. It seems to me you never mention the splines Python library. It provides several types of quaternions interpolation. In particular, there is a "constant speed adapter" of splines. I realized this animation with it: