Code Monkey home page Code Monkey logo

manim-slides's Introduction

Manim Slides Logo

Latest Release Python version PyPI - Downloads Documentation

Manim Slides

Tool for live presentations using either Manim (community edition) or ManimGL. Manim Slides will automatically detect the one you are using!

NOTE: this project extends the work of manim-presentation, with a lot more features!

Installation

While installing Manim Slides and its dependencies on your global Python is fine, I recommend using a virtual environment (e.g., venv) for a local installation.

Dependencies

Manim Slides requires either Manim or ManimGL to be installed. Having both packages installed is fine too.

If none of those packages are installed, please refer to their specific installation guidelines:

Pip Install

The recommended way to install the latest release is to use pip:

pip install manim-slides

Install From Repository

An alternative way to install Manim Slides is to clone the git repository, and install from there: read the contributing guide to know how.

Usage

Using Manim Slides is a two-step process:

  1. Render animations using Slide (resp. ThreeDSlide) as a base class instead of Scene (resp. ThreeDScene), and add calls to self.next_slide() everytime you want to create a new slide.
  2. Run manim-slides on rendered animations and display them like a Power Point presentation.

The documentation is available online.

Basic Example

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

# example.py

from manim import *
# or: from manimlib import *
from manim_slides import Slide

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

        self.play(GrowFromCenter(circle))
        self.next_slide()  # Waits user to press continue to go to the next slide

        self.start_loop()  # Start loop
        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
        self.end_loop()  # This will loop until user inputs a key

        self.play(dot.animate.move_to(ORIGIN))
        self.next_slide()  # Waits user to press continue to go to the next slide

First, render the animation files:

manim example.py BasicExample
# or
manimgl example.py BasicExample

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

manim-slides [OPTIONS] Scene1 Scene2...

Or in this example:

manim-slides BasicExample

Key Bindings

The default key bindings to control the presentation are:

Manim Slides Wizard

You can run the configuration wizard to change those key bindings:

manim-slides wizard

A default file can be created with:

manim-slides init

NOTE: manim-slides uses key codes, which are platform dependent. Using the configuration wizard is therefore highly recommended.

Interactive Tutorial

Click on the image to watch a slides presentation that explains you how to use Manim Slides.

Manim Slides Docs

Other Examples

Other examples are available in the example.py file, if you downloaded the git repository.

Below is a small recording of me playing with the slides back and forth.

Comparison with Similar Tools

There exists are variety of tools that allows to create slides presentations containing Manim animations.

Below is a comparison of the most used ones with Manim Slides:

Project name Manim Slides Manim Presentation Manim Editor Jupyter Notebooks
Link GitHub Repo stars GitHub Repo stars GitHub Repo stars GitHub Repo stars
Activity GitHub Repo stars GitHub Repo stars GitHub Repo stars GitHub Repo stars
Usage Command-line Command-line Web Browser Notebook
Note Requires minimal modif. in scenes files Requires minimal modif. in scenes files Requires the usage of sections, and configuration through graphical interface Relies on nbconvert to create slides from a Notebook
Support for ManimGL Yes No No No
Web Browser presentations Yes No Yes No
Offline presentations Yes, with Qt Yes, with OpenCV No No

F.A.Q

How to increase quality on Windows

On Windows platform, one may encounter a lower image resolution than expected. Usually, this is observed because Windows rescales every application to fit the screen. As found by @arashash, in #20, the problem can be addressed by changing the scaling factor to 100%:

Windows Fix Scaling

in Settings->Display.

Contributing

Contributions are more than welcome! Please read through our contributing section.

manim-slides's People

Contributors

jeertmans avatar galatolofederico avatar pre-commit-ci[bot] avatar linusheck avatar ahmedsilat44 avatar tdadela avatar fairlight8 avatar dependabot[bot] avatar mikegillotti avatar elliotwutingfeng avatar wucheng98 avatar robotboyfriend avatar yang-fighter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.