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 61662476a9 Fix warnings.
2020-06-24 23:07:56 +08:00
.azure Morphology Core (#69) 2020-06-24 22:03:02 +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 Reduce test fidelity from 50 frames to 10 frames. 2020-06-24 22:36:56 +08:00
examples Reduce test fidelity from 50 frames to 10 frames. 2020-06-24 22:36:56 +08:00
src Fix warnings. 2020-06-24 23:07:56 +08:00
test Feature morph (#62) 2020-05-14 15:14:29 +08:00
videos Merge branch 'master' of github.com:Lemmih/reanimate 2020-06-24 22:33:08 +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 Morphology Core (#69) 2020-06-24 22:03:02 +08:00
hie.yaml Feature morph (#62) 2020-05-14 15:14:29 +08:00
LICENSE Create LICENSE 2019-09-12 23:00:55 +08:00
mkdocs.yml Draft article about fonts (#95) 2020-06-24 22:02:09 +08:00
README.md Link to William Yaoh's n-queen tutorial. Drop link to defunkt gallery. 2020-06-06 14:49:15 +08:00
reanimate.cabal Morphology Core (#69) 2020-06-24 22:03:02 +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-12.yaml Check haddock documentation on CI servers (#87) 2020-06-09 19:25:27 +08:00
stack-lts-13.yaml Feature morph (#62) 2020-05-14 15:14:29 +08:00
stack-lts-14.yaml Feature morph (#62) 2020-05-14 15:14:29 +08:00
stack-lts-15.yaml Switch to lts-16.0 2020-06-10 14:54:26 +08:00
stack.yaml Switch to lts-16.0 2020-06-10 14:54:26 +08:00

Hackage Build Status Documentation Status Platforms GitHub repo size

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 and effects

LaTeX Stars

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.