Back to Reyanda
By Reyanda · Open Source · MIT

manimR

Mathematical animation engine for R.
Create stunning programmatic animations,
videos, and visualizations — in pure R.

Quick install
install.packages("manimR")
manimR · fourier_demo.R
f(t) = sin(t) manimR::Fourier(n=1)
library(manimR)

scene <- Scene$new(bg = "#050510")

# Fourier decomposition
f <- FourierSeries(
  harmonics = 8,
  color     = "#a855f7"
)

scene$play(DrawCircles(f))
scene$play(Trace(f, color = "#06b6d4"))
scene$render("fourier.mp4")
MIT License
R ≥ 4.0 Requirement
MP4 / GIF / SVG Output formats
60fps Smooth rendering
CRAN Distribution

Everything you need
to animate mathematics.

Expressive, composable, and fast — manimR brings the power of programmatic animation to the R ecosystem.

Scene-based API

Compose animations frame-by-frame using a clean, functional scene API. Chain transforms, play multiple objects simultaneously, and control timing with easing functions — all from R.

scene$play(Create(circle), run_time = 2)
scene$play(Rotate(circle, PI), FadeIn(label))

Rich primitives

Circles, polygons, arrows, Bézier curves, LaTeX labels, number lines, coordinate axes, graphs, and 3D surfaces — all animatable.

60fps rendering

Hardware-accelerated via Cairo and FFmpeg. Produce broadcast-quality MP4 at 60fps or optimized GIFs without leaving R.

LaTeX support

Write equations using standard LaTeX syntax and animate them — transform, morph, or highlight individual terms.

Easing & timing

Built-in easing curves — linear, ease-in-out, spring, bounce — with per-object and per-scene timing control.

3D scenes

Render three-dimensional mathematical objects — surfaces, vector fields, parametric curves — with full camera orbit, zoom, and lighting control. Powered by an OpenGL-compatible backend.

scene3d <- Scene3D$new()
surf <- Surface(z ~ sin(x) * cos(y))
scene3d$play(OrbitCamera(surf, angle = TAU))

Zero to animation
in five minutes.

01

Install

Get manimR from CRAN or install the development version directly from GitHub.

R console
# From CRAN
install.packages("manimR")

# Dev version
remotes::install_github(
  "Reyanda/manimR"
)
02

Write your scene

Create a scene, add objects, and describe animations using the fluent R API.

scene.R
library(manimR)

scene <- Scene$new()

sq <- Square(
  side  = 2,
  color = "#6366f1"
)

scene$play(
  Create(sq),
  Rotate(sq, PI / 4),
  FadeOut(sq)
)
03

Render

Call render() and choose your output format — MP4, GIF, or transparent WebM.

render
# Render at 60fps, 1080p
scene$render(
  output = "my_anim.mp4",
  fps    = 60,
  width  = 1920,
  height = 1080
)
# → Output: my_anim.mp4 ✓

Everything documented.
Nothing assumed.

Full API reference, tutorials from first animation to advanced 3D scenes, and a cookbook of ready-made examples — all on GitHub.