mathematical animations with haskell https://reanimate.github.io
  • Haskell 95.8%
  • Elm 3.9%
  • Nix 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Himmelstrup 0be400a482 azure caching.
Former-commit-id: 689251ee5c468b6a5c0ab6fc2806e32e21a8cf5e
2019-09-10 09:56:05 +08:00
data Color space support (CIExyz, CIElab) 2019-09-01 12:42:56 +08:00
examples Add testsuite. 2019-09-09 19:10:31 +08:00
server
src/Reanimate Fix check for latex packages. 2019-09-09 21:21:30 +08:00
test Reduce output during testing. 2019-09-10 09:38:07 +08:00
viewer Don't restart animations when all frames are rendered. 2019-09-08 16:17:39 +08:00
web
azure-pipelines.yml azure caching. 2019-09-10 09:56:05 +08:00
BAKER_SCRIPT.md Create BAKER_SCRIPT.md 2019-07-15 14:51:49 +08:00
ChangeLog.md Update changelog. 2019-07-07 11:22:02 +08:00
README.md Delete references to the live playground. 2019-09-09 09:47:05 +08:00
reanimate.cabal Add 'check' command to verify dependencies. 2019-09-09 20:58:05 +08:00
Setup.hs
stack.yaml Add testsuite. 2019-09-09 19:10:31 +08:00
stateful.hs Draft at stateful API. 2019-09-09 17:06:22 +08:00
test_latex.tex Add latex file for testing if all required latex packages have been installed. 2019-07-04 18:16:49 +08:00

Hackage Build Status

reanimate

Reanimate is a reactive framework for creating non-interactive animations from SVG images. This package consists of a set of combinators, a renderer (using ffmpeg), and a web-based previewer. Inline latex code is supported when 'latex' and 'dvisvgm' are installed.

Nothing about the API is stable at this point.

YouTube

Completed animations are uploaded to the Reanimated Science channel.

Animation snippets are uploaded to the Reanimated Science Playground channel.

Getting started

Reanimate ships with a web-based viewer and automatic code reloading. To get a small demo up and running, clone the repository, run one of the examples (this will install the library), and wait for a browser window to open:

$ git clone https://github.com/Lemmih/reanimate.git
$ cd reanimate/examples/
$ ./latex_color.hs

This should render the latex_color example in a new browser window. If you then change the animation source code, the browser window will automatically reload and show the updated animation.

TODO

  • website for live coding
  • bounding boxes
  • Use svg-tree instead of lucid-svg
  • crossplatform file watching
  • Improve bounding box approximations
  • Select desired FPS in web previewer
  • Download rendered animations in web previewer
  • Alignment and positioning combinators
  • Consistent caching framework
  • Figure out why performance doesn't scale linearly with more cores
    • diagrams are slow because they are rendered as a bytestring and then parsed as SVG. Find a way to shortcut.
  • Test-suite: Compile and render all the example animations on the build servers. The SVG output should be stable.
  • API for generating slides.
  • Warn if 'group' nodes are found in 'clippath's.
  • Driver:
    • Command line options for rendering videos.
    • Flags for selecting fps in web viewer
    • Command for validating tools: latex, dvisvgm, ffmpeg. Warn of old versions of ffmpeg that don't render SVGs correctly.
    • Use GHC.Environment to find own source code.
    • Generate interleaved frames (1fps, 2fps, 4fps, etc)
    • Flag for generating youtube videos (ffmpeg options preset).
  • Viewer:
    • Keys for pausing, moving frame-by-frame, resetting.
    • Fix race conditions.

Examples

The example gifs are displayed at 25 fps.

Sunflower Tangent Goo Drawing LaTeX equations Bounding boxes Colorful LaTeX Bezier curves Sine wave Morphing wave Morphing wave to circle Speed modification Highlight Clipping Scaling Valentine's Day Basic LaTeX