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 d02a63b962 Try to force plaintext formatting.
Former-commit-id: 3a5878e60d27723855be89c0ca351e45561cc4bb
2020-05-23 10:21:52 +08:00
.azure Voice control (#75) 2020-05-22 23:30:44 +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 Try to force plaintext formatting. 2020-05-23 10:21:52 +08:00
examples Voice control (#75) 2020-05-22 23:30:44 +08:00
src Voice control (#75) 2020-05-22 23:30:44 +08:00
test Feature morph (#62) 2020-05-14 15:14:29 +08:00
videos Rename Interpolate module to ColorComponents 2020-05-21 21:12:33 +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 Bump version to 0.3.2.0 2020-05-16 14:38:14 +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 Try to force plaintext formatting. 2020-05-23 10:21:52 +08:00
README.md Add stars example. (#71) 2020-05-18 20:49:32 +08:00
reanimate.cabal Bump version to 0.3.3.0 2020-05-22 23:32:01 +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-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.yaml Feature morph (#62) 2020-05-14 15:14:29 +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 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.