Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
An Animation-Interpolator, "reverse-engineered" from facebook/rebound
- Host: GitHub
- URL: https://github.com/osanj/spring-interpolator
- Owner: osanj
- Created: 2015-01-11T17:55:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-01-05T13:20:01.000Z (almost 5 years ago)
- Last Synced: 2023-02-27T17:05:47.399Z (almost 2 years ago)
- Topics: animation, dynamic-systems, ode, ordinary-differential-equations, runge-kutta-4
- Language: Java
- Homepage:
- Size: 51.8 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```