Skip to main content

A library that extends the capabilities of Manim

Project description

Main Logo

ManimExtra - Addition to the standard set function in ManimCE

Table of Contents:

What is it?

ManimExtra provides an advanced feature set for ManimCE. The library makes it easy to work with geometry by adding many classic designs, such as a bisector or an inscribed circle. There are also many objects that'll simplify the work with algebra by adding systems of equations and a trigonometric circle.

Installation

Installing the library is straightforward. If there were no problems with the installation of ManimCE, then there'll be no problems here. On Windows, you need to write the command

pip install manimextra

And on Linux/MacOS

pip3 install manimextra

Examples

Below are some complex usage examples combining several objects from ManimExtra.

Example 1: Triangle Centers and Circles

from manim import *
from manimextra import *

class TriangleCentersScene(Scene):
    def construct(self):
        A = Dot(3 * LEFT + 2 * DOWN, color=RED)
        B = Dot(2 * LEFT + 3 * UP, color=GREEN)
        C = Dot(3 * RIGHT + 2 * DOWN, color=BLUE)

        sides = VGroup(Line(B, C), Line(A, C), Line(A, B))

        incenter = Incenter(A, B, C).set_color(YELLOW)
        centroid = Centroid(A, B, C).set_color(PURPLE)
        circumcenter = Circumcenter(A, B, C).set_color(ORANGE)

        incircle = Incircle(A, B, C, color=YELLOW, stroke_opacity=0.5)
        circumcircle = Circumcircle(A, B, C, color=ORANGE, stroke_opacity=0.5)

        self.add(A, B, C, sides)
        self.play(FadeIn(incenter), FadeIn(incircle))
        self.play(FadeIn(centroid))
        self.play(FadeIn(circumcenter), FadeIn(circumcircle))
        self.wait()

Example 2: System of Equations Animation

from manim import *
from manimextra import *

class SystemOfEquationsExample(Scene):
    def construct(self):
        system1 = SystemOfEquations(
            MathTex("x + y = 2"),
            MathTex("x - y = 0")
        )
        system2 = SystemOfEquations(
            MathTex("x = 1"),
            MathTex("y = 1")
        )
        self.play(FadeIn(system1))
        self.wait()
        self.play(TransformSystem(system1, system2))
        self.wait()

Example 3: Pie Chart and Unit Circle

from manim import *
from manimextra import *

class PieAndCircleScene(Scene):
    def construct(self):
        pie = PieChart(
            data={"A": 10, "B": 20, "C": 30},
            label_buff=0.7,
            inner_radius=1,
            outer_radius=2
        ).to_edge(LEFT)
        circle = UnitCircle().to_edge(RIGHT)
        circle.add_point(PI / 2, r"\dfrac{\pi}{2}")
        circle.add_point(PI, r"\pi")
        self.play(FadeIn(pie), FadeIn(circle))
        self.wait()

Documentation

Full documentation with API reference and more examples is available at:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manimextra-1.12.2.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manimextra-1.12.2-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file manimextra-1.12.2.tar.gz.

File metadata

  • Download URL: manimextra-1.12.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.8.0-1021-azure

File hashes

Hashes for manimextra-1.12.2.tar.gz
Algorithm Hash digest
SHA256 142a7058daad519fdc783b7a469211fcc56730ba0e0dd811de372dbb9a70ff6c
MD5 1b3d9d9f09ccbb3d562180b2dc686b38
BLAKE2b-256 0f78864bda15e7be4dfc27f768eafaa1df888105d664f762be08d89069608477

See more details on using hashes here.

File details

Details for the file manimextra-1.12.2-py3-none-any.whl.

File metadata

  • Download URL: manimextra-1.12.2-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.8.0-1021-azure

File hashes

Hashes for manimextra-1.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d0ef33ca71d19d2717cb0c1885baf73e3d269832f483921936978dfae95fcf9
MD5 f39b5eaee5fde537791b1aeef08d5bf7
BLAKE2b-256 86bf8c2229ae9fc244ce59c662c47fe1b5390c82440f8ea314e1a14b38ed33e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page