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 83c3967cfd Update ChangeLog.
Former-commit-id: ea68c0f14a22778afd1ad2c4ead0764f8913cf69
2020-05-14 10:08:11 +08:00
.azure Evict osx cache. 2020-05-11 13:51:46 +08:00
.github Fix filename. 2020-03-24 21:34:43 +08:00
data Geo projections (#52) 2020-02-11 19:10:45 +08:00
docs Add documentation for 'withViewBox'. 2020-05-14 10:07:05 +08:00
examples Add documentation for 'withViewBox'. 2020-05-14 10:07:05 +08:00
src Add documentation for 'withViewBox'. 2020-05-14 10:07:05 +08:00
test Disable video checking when running testsuite from cabal file. 2020-02-24 21:33:58 +08:00
videos Improve README examples (#68) 2020-05-06 19:16:25 +08:00
viewer-elm Update viewer js dependencies. 2020-03-24 11:37:01 +08:00
.gitignore Add .stack-work to .gitignore 2019-12-10 10:36:07 +01:00
azure-pipelines.yml Fix azure formatting. 2019-09-17 10:04:23 +08:00
ChangeLog.md Update ChangeLog. 2020-05-14 10:08:11 +08:00
LICENSE Create LICENSE 2019-09-12 23:00:55 +08:00
mkdocs.yml Documentation. (#12) 2019-09-19 16:52:34 +08:00
README.md Improve README examples (#68) 2020-05-06 19:16:25 +08:00
reanimate.cabal Bump version to 0.3.1.0 2020-05-12 13:17:53 +08:00
RESOURCES.md Country distortion video (#54) 2020-02-20 21:22:36 +08:00
Setup.hs First stab at reanimate. 2019-02-13 21:08:49 +01:00
stack-lts-11.yaml Country distortion video (#54) 2020-02-20 21:22:36 +08:00
stack-lts-12.yaml Country distortion video (#54) 2020-02-20 21:22:36 +08:00
stack.yaml Improve README examples (#68) 2020-05-06 19:16:25 +08:00
stack.yaml.lock Improve README examples (#68) 2020-05-06 19:16:25 +08:00

Hackage Build Status Documentation Status Platforms

Reanimate

Reanimate is a library for programmatically generating animations with a twist towards mathematics / 2D vector drawings. A lot of inspiration was drawn from 3b1b's manim library.

Reanimate aims at being a batteries-included way of gluing together different technologies: SVG as a universal image format, LaTeX for typesetting, ffmpeg for video encoding, inkscape/imagemagick for rasterization, potrace for vectorization, blender/povray for 3D graphics, and Haskell for scripting.

In more practical terms, reanimate is a library for turning code like this:

main = reanimate $ docEnv $ playThenReverseA drawCircle

... into animations like this:

Draw Circle

What is reanimate good at?

Vector graphics and math

Tangent/Normal Fourier

Mapping and tracing

Geo JSON Object tracing

Mathematical typesetting

LaTeX

2D physics and 3D graphics

2D Physics 3D graphics

Prerequisites

Reanimate is built using the Haskell Tool Stack. For installation instructions, see: https://docs.haskellstack.org/en/stable/README/

Optionally, you can install one or more of these programs to enable additional features:

I highly recommend that you install at least 'ffmpeg' and 'latex'.

Installing / Running an example

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/
$ stack build
$ stack ./examples/doc_drawCircle.hs

This should render the doc_drawCircle 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.

Documentation

Authors

  • David Himmelstrup.
  • Jan Hrcek.

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

Acknowledgments

  • Huge thanks to 3b1b's manim which inspired this library.
  • Thanks to svg-tree for their SVG library.
  • Thanks to CthulhuDen/chiphunk for making a 2D physics library easily available.
  • Thanks to Peter Johnson for reserving the 'reanimate' organization on GitHub.

YouTube

Completed animations are uploaded to the Reanimated Science channel.

Animation snippets are uploaded to the Reanimated Science Shorts channel.