Skip to main content

manim-presentation

Tool for live presentations using manim

Install

pip install manim-presentation opencv-python

Usage

Use the class Slide as your scenes base class

from manim_presentation import Slide

class Example(Slide):
    def construct(self):
        ...

call self.pause() when you want to pause the playback and wait for an input to continue (check the keybindings)

Wrap a series of animations between self.start_loop() and self.stop_loop() when you want to loop them (until input to continue)

from manim import *
from manim_presentation import Slide

class Example(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))
        self.pause()

        self.start_loop()
        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
        self.end_loop()

        self.play(dot.animate.move_to(ORIGIN))
        self.pause()

        self.wait()

You must end your Slide with a self.play(...) or a self.wait(..)

To start the presentation using Scene1, Scene2 and so on simply run:

manim_presentation Scene1 Scene2...

Keybindings

Default keybindings to control the presentation

Keybinding Action
Right Arrow Continue/Next Slide
Left Arrow Previous Slide
R Re-Animate Current Slide
Spacebar Play/Pause
Q Quit

You can run the configuration wizard with

manim-presentation-wizard

Alternatively you can specify different keybindings creating a file named manim-presentation.json with the keys: QUIT_KEY CONTINUE_KEY BACK_KEY REWIND_KEY and PLAYPAUSE_KEY manim-presentation uses cv2.waitKeyEx() to wait for keypresses

Run Example

Clone this repository

git clone https://github.com/galatolofederico/manim-presentation.git
cd manim-presentation

Create a virtualenv

virtualenv --python=python3.7 env
. ./env/bin/activate

Install manim and manim-presentation

pip install manim manim-presentation opencv-python

Render the example scene

manim -qh example.py

Run the presentation

manim-presentation Example

Contributions and license

The code is released as Free Software under the GNU/GPLv3 license. Copying, adapting and republishing it is not only consent but also encouraged.

For any further question feel free to reach me at federico.galatolo@ing.unipi.it or on Telegram @galatolo

Metadata

Release files for manim-presentation 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manim-presentation 0.2.1
File Size Uploaded Provenance Actions
manim_presentation-0.2.1.tar.gz 18.3 kB Without provenance Details for manim_presentation-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for manim-presentation 0.2.1
File Interpreter ABI Platform Actions
manim_presentation-0.2.1-py3-none-any.whl Python 3 none any Details for manim_presentation-0.2.1-py3-none-any.whl

Total release size: 38.3 kB

Release files / manim_presentation-0.2.1.tar.gz

Download URL manim_presentation-0.2.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
adea29d4016e02bdfe432e7a5934de31e4d1ee0fc26cfd1ae96d5ce3234baf40
BLAKE2b-256 checksum
How to use checksums
4e2e3a9791b5be4df415c472bf0a7ea1e91f8178678aba9b8f83439365521db6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / manim_presentation-0.2.1-py3-none-any.whl

Download URL manim_presentation-0.2.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
336c8689d5240a5a3eb742d962e7b8b84f58e51a1b910c2facf6428ae7af7e3a
BLAKE2b-256 checksum
How to use checksums
0fb08a146df9c456d490fc4c2cc64898f622c515a31dfe5807d7455935f087da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for manim-presentation 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page