Skip to content

Latest commit

 

History

History
43 lines (22 loc) · 766 Bytes

README.md

File metadata and controls

43 lines (22 loc) · 766 Bytes

MathAnimatoR

Manim is an engine for precise programmatic animations, designed for creating explanatory math videos with R.


library(MathAnimatoR)

scene <- init_scene()

mCircle <- circle()
mSquare <- square() # create a square

pink <- "#D147BD"

anim1 <- mSquare |>
            flip(direction=LEFT) |>
            rotate(pi / 4) |> # rotate a certain amount
            display()

anim2 <- mSquare|>
            transmute( mCircle |> set_fill(pink, opacity=0.5) ) # interpolate the square into the circle

anim3 <- mSquare |>
            fadeout() #fade out animation


play(scene, anim1)

play(scene, anim2)

play(scene, anim3)


scene |> render()


Scene.mp4