Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/osanj/spring-interpolator

An Animation-Interpolator, "reverse-engineered" from facebook/rebound
https://github.com/osanj/spring-interpolator

animation dynamic-systems ode ordinary-differential-equations runge-kutta-4

Last synced: about 1 month ago
JSON representation

An Animation-Interpolator, "reverse-engineered" from facebook/rebound

Awesome Lists containing this project

README

        

# Spring-Interpolator (Rebuilding Facebook Rebound)

SpringInterpolator is an interpolater for animations. It is "reversed-engineered" from facebook's [rebound library](https://github.com/facebook/rebound) (I did not look at their code!). The main component of this project is an ordinary differential equation of second order and a Runge-Kutta-4 solver. Details can be found in my [blog article](https://osanj.github.io/post/spring-dynamics-interpolation/).

To use this code implement the listener interface. Also take a look at the example application.

```java
SpringInterpolator interpolator = new SpringInterpolator();
interpolator.addListener(this); // to receive the update events
interpolator.setFinalPosition(true); // causes the system to oscillate
```