4 ms·
One trick I've noticed to make animations/transitions "snappier" and more natural is to use quadratic/square (power of 2) scaling. For fun I did it on this clo
by Breakthrough 12y ago
One trick I've noticed to make animations/transitions "snappier" and more natural is to use quadratic/square (power of 2) scaling. For fun I did it on this clock just saving it locally - you can do it by modifying line 140 of `bezier_clock.pde` to square the ratio instead of simply assign it:
animationRatio = ratio * ratio; // can also replace with sqrt(ratio)
Again, just makes it a little bit 'snappier' (remember you have to hit spacebar to turn on continual animation), and scales it so you can determine the numbers a bit more clear earlier in the cycle because of the scaling on (0.0, 1.0]. This is certainly a fun piece of code to play with.
- codecam 12y agoWhere did you find bezier_clock.pde to modify? I would like to try a few things as well.
- mietek 12y agoThere are many interesting easing functions to play with, primarily due to Robert Penner: http://www.robertpenner.com/easing/ http://www.robertpenner.com/easing/
- AlexBelgium 12y agoCool. That's actually fun to try out. http://plnkr.co/edit/JybIMrHpUzGyr39cV5oz?p=preview http://plnkr.co/edit/JybIMrHpUzGyr39cV5oz?p=preview
- frigaardj 12y agoI've updated it with quad, cubic and sinusoidal modes. They all look good. Only problem is that because it's no longer linear, the various points can change at different rates and thus create 'kinks' in the curve. When it's linear, the 'line points' and the associated 'control points' are always in a line locally tangential to the curve (don't know the proper terminology but hopefully you understand).
- deleted 12y ago[deleted]
- nyan_sandwich 12y agoThat shouldn't happen if you do the motion transform uniformly on all axes. It should just be equivalent to changing the speed of time, rather than actually changing the trajectories.