file_path stringlengths 29 93 | content stringlengths 0 117k |
|---|---|
manim_ManimCommunity/.readthedocs.yml | version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- libpango1.0-dev
- ffmpeg
- graphviz
python:
install:
- requirements: docs/rtd-requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
|
manim_ManimCommunity/conftest.py | # This file is automatically picked by pytest
# while running tests. So, that each test is
# run on difference temporary directories and avoiding
# errors.
from __future__ import annotations
try:
# https://github.com/moderngl/moderngl/issues/517
import readline # required to prevent a segfault on Python 3.10... |
manim_ManimCommunity/README.md | <p align="center">
<a href="https://www.manim.community/"><img src="https://raw.githubusercontent.com/ManimCommunity/manim/main/logo/cropped.png"></a>
<br />
<br />
<a href="https://pypi.org/project/manim/"><img src="https://img.shields.io/pypi/v/manim.svg?style=flat&logo=pypi" alt="PyPI Latest Release"... |
manim_ManimCommunity/lgtm.yml | queries:
- exclude: py/init-calls-subclass
- exclude: py/unexpected-raise-in-special-method
- exclude: py/modification-of-locals
- exclude: py/multiple-calls-to-init
- exclude: py/missing-call-to-init
|
manim_ManimCommunity/CODE_OF_CONDUCT.md |
# Code of Conduct
> TL;DR Be excellent to each other; we're a community after all. If you run into issues with others in our community, please [contact](https://www.manim.community/discord/) a Manim Community Dev, or Moderator.
## Purpose
The Manim Community includes members of varying skills, languages, pers... |
manim_ManimCommunity/.codecov.yml | codecov:
notify:
require_ci_to_pass: no
after_n_builds: 1
coverage:
status:
project:
default:
# Require 1% coverage, i.e., always succeed
target: 1
patch: true
changes: false
comment: off
|
manim_ManimCommunity/CONTRIBUTING.md | # Thanks for your interest in contributing!
Please read our contributing guidelines which are hosted at https://docs.manim.community/en/latest/contributing.html
|
manim_ManimCommunity/crowdin.yml | files:
- source: /docs/i18n/gettext/**/*.pot
translation: /docs/i18n/%two_letters_code%/LC_MESSAGES/**/%file_name%.po
|
manim_ManimCommunity/docker/readme.md | See the [main README](https://github.com/ManimCommunity/manim/blob/main/README.md) for some instructions on how to use this image.
# Building the image
The docker image corresponding to the checked out version of the git repository
can be built by running
```
docker build -t manimcommunity/manim:TAG -f docker/Dockerfi... |
manim_ManimCommunity/.github/PULL_REQUEST_TEMPLATE.md | <!-- Thank you for contributing to Manim! Learn more about the process in our contributing guidelines: https://docs.manim.community/en/latest/contributing.html -->
## Overview: What does this pull request change?
<!-- If there is more information than the PR title that should be added to our release changelog, add it ... |
manim_ManimCommunity/.github/dependabot.yml | version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-minor"
- "version-update:semver-patch"
|
manim_ManimCommunity/.github/codeql.yml | query-filters:
- exclude:
id: py/init-calls-subclass
- exclude:
id: py/unexpected-raise-in-special-method
- exclude:
id: py/modification-of-locals
- exclude:
id: py/multiple-calls-to-init
- exclude:
id: py/missing-call-to-init
paths:
- manim
path... |
manim_ManimCommunity/.github/workflows/cffconvert.yml | name: cffconvert
on:
push:
paths:
- CITATION.cff
jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citat... |
manim_ManimCommunity/.github/workflows/dependent-issues.yml | name: Dependent Issues
on:
issues:
types:
- opened
- edited
- reopened
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize
schedule:
- cron: '0 0 * * *' # schedule daily check
jobs:
check:
runs-on: ubuntu-latest
steps:
- us... |
manim_ManimCommunity/.github/workflows/ci.yml | name: CI
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
env:
DISPLAY: :0
PYTEST_ADDOPTS: "--color=yes" # colors in pytest
strategy:
fail-fast: fa... |
manim_ManimCommunity/.github/workflows/publish-docker.yml | name: Publish Docker Image
on:
push:
branches:
- main
release:
types: [released]
jobs:
docker-latest:
runs-on: ubuntu-latest
if: github.event_name != 'release'
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: d... |
manim_ManimCommunity/.github/workflows/codeql.yml | name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "21 16 * * 3"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
... |
manim_ManimCommunity/.github/workflows/release-publish-documentation.yml | name: Publish downloadable documentation
on:
release:
types: [released]
workflow_dispatch:
jobs:
build-and-publish-htmldocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
... |
manim_ManimCommunity/.github/workflows/python-publish.yml | name: Publish Release
on:
release:
types: [released]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: python -m pip inst... |
manim_ManimCommunity/.github/scripts/ci_build_cairo.py | # Logic is as follows:
# 1. Download cairo source code: https://cairographics.org/releases/cairo-<version>.tar.xz
# 2. Verify the downloaded file using the sha256sums file: https://cairographics.org/releases/cairo-<version>.tar.xz.sha256sum
# 3. Extract the downloaded file.
# 4. Create a virtual environment and install... |
manim_ManimCommunity/.github/PULL_REQUEST_TEMPLATE/hackathon.md | Thanks for your contribution for the manim community hackathon!
Please make sure your pull request has a meaningful title.
E.g. "Example for the class Angle".
Details for the submissions can be found in the [discord announcement channel](https://discord.com/channels/581738731934056449/581739610154074112/846460718479... |
manim_ManimCommunity/.github/PULL_REQUEST_TEMPLATE/documentation.md | <!-- Thank you for contributing to ManimCommunity!
Before filling in the details, ensure:
- The title of your PR gives a descriptive summary to end-users. Some examples:
- Fixed last animations not running to completion
- Added gradient support and documentation for SVG files
-->
## Summary of Changes
## Changelog... |
manim_ManimCommunity/.github/PULL_REQUEST_TEMPLATE/bugfix.md | <!-- Thank you for contributing to ManimCommunity!
Before filling in the details, ensure:
- The title of your PR gives a descriptive summary to end-users. Some examples:
- Fixed last animations not running to completion
- Added gradient support and documentation for SVG files
-->
## Changelog
<!-- Optional: more d... |
manim_ManimCommunity/.github/ISSUE_TEMPLATE/bug_report.md | ---
name: Manim bug
about: Report a bug or unexpected behavior when running Manim
title: ""
labels: bug
assignees: ''
---
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
## Expected behavior
<!-- Add a clear and concise description of what you... |
manim_ManimCommunity/.github/ISSUE_TEMPLATE/installation_issue.md | ---
name: Installation issue
about: Report issues with the installation process of Manim
title: ""
labels: bug, installation
assignees: ''
---
#### Preliminaries
- [ ] I have followed the latest version of the
[installation instructions](https://docs.manim.community/en/stable/installation.html).
- [ ] I have c... |
manim_ManimCommunity/.github/ISSUE_TEMPLATE/feature_request.md | ---
name: Feature request
about: Request a new feature for Manim
title: ""
labels: new feature
assignees: ''
---
## Description of proposed feature
<!-- Add a clear and concise description of the new feature, including a motivation: why do you think this will be useful? -->
## How can the new feature be used?
<!-- ... |
manim_ManimCommunity/scripts/extract_frames.py | import pathlib
import sys
import numpy as np
from PIL import Image
def main():
if len(sys.argv) != 3:
print_usage()
sys.exit(1)
npz_file = sys.argv[1]
output_folder = pathlib.Path(sys.argv[2])
if not output_folder.exists():
output_folder.mkdir(parents=True)
data = np.load... |
manim_ManimCommunity/scripts/template_docsting_with_example.py | # see more documentation guidelines online here: https://github.com/ManimCommunity/manim/wiki/Documentation-guidelines-(WIP)
from __future__ import annotations
class SomeClass:
"""A one line description of the Class.
A short paragraph providing more details.
Extended Summary
Parameters
------... |
manim_ManimCommunity/scripts/dev_changelog.py | #!/usr/bin/env python
"""Script to generate contributor and pull request lists.
This script generates contributor and pull request lists for release
changelogs using Github v3 protocol. Use requires an authentication token in
order to have sufficient bandwidth, you can get one following the directions at
`<https://hel... |
manim_ManimCommunity/scripts/make_and_open_docs.py | from __future__ import annotations
import os
import sys
import webbrowser
from pathlib import Path
path_makefile = Path(__file__).parents[1] / "docs"
os.system(f"cd {path_makefile} && make html")
website = (path_makefile / "build" / "html" / "index.html").absolute().as_uri()
try: # Allows you to pass a custom brows... |
manim_ManimCommunity/example_scenes/advanced_tex_fonts.py | from manim import *
# French Cursive LaTeX font example from http://jf.burnol.free.fr/showcase.html
# Example 1 Manually creating a Template
TemplateForFrenchCursive = TexTemplate(
preamble=r"""
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[default]{fr... |
manim_ManimCommunity/example_scenes/opengl.py | from pathlib import Path
import manim.utils.opengl as opengl
from manim import *
from manim.opengl import * # type: ignore
# Copied from https://3b1b.github.io/manim/getting_started/example_scenes.html#surfaceexample.
# Lines that do not yet work with the Community Version are commented.
def get_plane_mesh(context... |
manim_ManimCommunity/example_scenes/basic.py | #!/usr/bin/env python
from manim import *
# To watch one of these scenes, run the following:
# python --quality m manim -p example_scenes.py SquareToCircle
#
# Use the flag --quality l for a faster rendering at a lower quality.
# Use -s to skip to the end and just save the final frame
# Use the -p to have preview of... |
manim_ManimCommunity/example_scenes/customtex.py | from manim import *
class TexTemplateFromCLI(Scene):
"""This scene uses a custom TexTemplate file.
The path of the TexTemplate _must_ be passed with the command line
argument `--tex_template <path to template>`.
For this scene, you can use the custom_template.tex file next to it.
This scene will f... |
manim_ManimCommunity/manim/__main__.py | from __future__ import annotations
import sys
import click
import cloup
from . import __version__, cli_ctx_settings, console
from .cli.cfg.group import cfg
from .cli.checkhealth.commands import checkhealth
from .cli.default_group import DefaultGroup
from .cli.init.commands import init
from .cli.plugins.commands impo... |
manim_ManimCommunity/manim/__init__.py | #!/usr/bin/env python
from __future__ import annotations
from importlib.metadata import version
__version__ = version(__name__)
# isort: off
# Importing the config module should be the first thing we do, since other
# modules depend on the global config dict for initialization.
from ._config import *
# many scrip... |
manim_ManimCommunity/manim/constants.py | """
Constant definitions.
"""
from __future__ import annotations
from enum import Enum
import numpy as np
from cloup import Context
from PIL.Image import Resampling
from manim.typing import Vector3D
__all__ = [
"SCENE_NOT_FOUND_MESSAGE",
"CHOOSE_NUMBER_MESSAGE",
"INVALID_NUMBER_MESSAGE",
"NO_SCENE_... |
manim_ManimCommunity/manim/typing.py | """Custom type definitions used in Manim.
.. admonition:: Note for developers
:class: important
Around the source code there are multiple strings which look like this:
.. code-block::
'''
[CATEGORY]
<category_name>
'''
All type aliases defined under those strings wil... |
manim_ManimCommunity/manim/plugins/__init__.py | from __future__ import annotations
from manim import config, logger
from .plugins_flags import get_plugins, list_plugins
__all__ = [
"get_plugins",
"list_plugins",
]
requested_plugins: set[str] = set(config["plugins"])
missing_plugins = requested_plugins - set(get_plugins().keys())
if missing_plugins:
... |
manim_ManimCommunity/manim/plugins/plugins_flags.py | """Plugin Managing Utility"""
from __future__ import annotations
import sys
from typing import Any
if sys.version_info < (3, 10):
from importlib_metadata import entry_points
else:
from importlib.metadata import entry_points
from manim import console
__all__ = ["list_plugins"]
def get_plugins() -> dict[st... |
manim_ManimCommunity/manim/scene/__init__.py | |
manim_ManimCommunity/manim/scene/section.py | """building blocks of segmented video API"""
from __future__ import annotations
from enum import Enum
from pathlib import Path
from typing import Any
from manim import get_video_metadata
__all__ = ["Section", "DefaultSectionType"]
class DefaultSectionType(str, Enum):
"""The type of a section can be used for t... |
manim_ManimCommunity/manim/scene/scene.py | """Basic canvas for animations."""
from __future__ import annotations
from manim.utils.parameter_parsing import flatten_iterable_parameters
__all__ = ["Scene"]
import copy
import datetime
import inspect
import platform
import random
import threading
import time
import types
from queue import Queue
import srt
from... |
manim_ManimCommunity/manim/scene/moving_camera_scene.py | """A scene whose camera can be moved around.
.. SEEALSO::
:mod:`.moving_camera`
Examples
--------
.. manim:: ChangingCameraWidthAndRestore
class ChangingCameraWidthAndRestore(MovingCameraScene):
def construct(self):
text = Text("Hello World").set_color(BLUE)
self.add(text)
... |
manim_ManimCommunity/manim/scene/zoomed_scene.py | """A scene supporting zooming in on a specified section.
Examples
--------
.. manim:: UseZoomedScene
class UseZoomedScene(ZoomedScene):
def construct(self):
dot = Dot().set_color(GREEN)
self.add(dot)
self.wait(1)
self.activate_zooming(animate=False)
... |
manim_ManimCommunity/manim/scene/three_d_scene.py | """A scene suitable for rendering three-dimensional objects and animations."""
from __future__ import annotations
__all__ = ["ThreeDScene", "SpecialThreeDScene"]
import warnings
from typing import Iterable, Sequence
import numpy as np
from manim.mobject.geometry.line import Line
from manim.mobject.graphing.coordi... |
manim_ManimCommunity/manim/scene/scene_file_writer.py | """The interface between scenes and ffmpeg."""
from __future__ import annotations
__all__ = ["SceneFileWriter"]
import json
import os
import shutil
import subprocess
from pathlib import Path
from typing import TYPE_CHECKING, Any
import numpy as np
import srt
from PIL import Image
from pydub import AudioSegment
fro... |
manim_ManimCommunity/manim/scene/vector_space_scene.py | """A scene suitable for vector spaces."""
from __future__ import annotations
__all__ = ["VectorScene", "LinearTransformationScene"]
from typing import Callable
import numpy as np
from manim.mobject.geometry.arc import Dot
from manim.mobject.geometry.line import Arrow, Line, Vector
from manim.mobject.geometry.polyg... |
manim_ManimCommunity/manim/renderer/shader_wrapper.py | from __future__ import annotations
import copy
import re
from pathlib import Path
import moderngl
import numpy as np
from .. import logger
# Mobjects that should be rendered with
# the same shader will be organized and
# clumped together based on keeping track
# of a dict holding all the relevant information
# to t... |
manim_ManimCommunity/manim/renderer/__init__.py | |
manim_ManimCommunity/manim/renderer/vectorized_mobject_rendering.py | from __future__ import annotations
import collections
import numpy as np
from ..utils import opengl
from ..utils.space_ops import cross2d, earclip_triangulation
from .shader import Shader
__all__ = [
"render_opengl_vectorized_mobject_fill",
"render_opengl_vectorized_mobject_stroke",
]
def build_matrix_lis... |
manim_ManimCommunity/manim/renderer/cairo_renderer.py | from __future__ import annotations
import typing
import numpy as np
from manim.utils.hashing import get_hash_from_play_call
from .. import config, logger
from ..camera.camera import Camera
from ..mobject.mobject import Mobject
from ..scene.scene_file_writer import SceneFileWriter
from ..utils.exceptions import EndS... |
manim_ManimCommunity/manim/renderer/opengl_renderer.py | from __future__ import annotations
import itertools as it
import sys
import time
from typing import Any
if sys.version_info < (3, 8):
from backports.cached_property import cached_property
else:
from functools import cached_property
import moderngl
import numpy as np
from PIL import Image
from manim import c... |
manim_ManimCommunity/manim/renderer/shader.py | from __future__ import annotations
import inspect
import re
import textwrap
from pathlib import Path
import moderngl
import numpy as np
from .. import config
from ..utils import opengl
SHADER_FOLDER = Path(__file__).parent / "shaders"
shader_program_cache: dict = {}
file_path_to_code_map: dict = {}
__all__ = [
... |
manim_ManimCommunity/manim/renderer/opengl_renderer_window.py | from __future__ import annotations
import moderngl_window as mglw
from moderngl_window.context.pyglet.window import Window as PygletWindow
from moderngl_window.timers.clock import Timer
from screeninfo import get_monitors
from .. import __version__, config
__all__ = ["Window"]
class Window(PygletWindow):
fulls... |
manim_ManimCommunity/manim/renderer/shaders/include/NOTE.md | There seems to be no analog to #include in C++ for OpenGL shaders. While there are other options for sharing code between shaders, a lot of them aren't great, especially if the goal is to have all the logic for which specific bits of code to share handled in the shader file itself. So the way manim currently works is... |
manim_ManimCommunity/manim/mobject/logo.py | """Utilities for Manim's logo and banner."""
from __future__ import annotations
__all__ = ["ManimBanner"]
import svgelements as se
from manim.animation.updaters.update import UpdateFromAlphaFunc
from manim.mobject.geometry.arc import Circle
from manim.mobject.geometry.polygram import Square, Triangle
from .. impor... |
manim_ManimCommunity/manim/mobject/matrix.py | r"""Mobjects representing matrices.
Examples
--------
.. manim:: MatrixExamples
:save_last_frame:
class MatrixExamples(Scene):
def construct(self):
m0 = Matrix([["\\pi", 0], [-1, 1]])
m1 = IntegerMatrix([[1.5, 0.], [12, -1.3]],
left_bracket="(",
... |
manim_ManimCommunity/manim/mobject/value_tracker.py | """Simple mobjects that can be used for storing (and updating) a value."""
from __future__ import annotations
__all__ = ["ValueTracker", "ComplexValueTracker"]
import numpy as np
from manim.mobject.mobject import Mobject
from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL
from manim.utils.paths i... |
manim_ManimCommunity/manim/mobject/__init__.py | |
manim_ManimCommunity/manim/mobject/mobject.py | """Base classes for objects that can be displayed."""
from __future__ import annotations
__all__ = ["Mobject", "Group", "override_animate"]
import copy
import inspect
import itertools as it
import math
import operator as op
import random
import sys
import types
import warnings
from functools import partialmethod, r... |
manim_ManimCommunity/manim/mobject/graph.py | """Mobjects used to represent mathematical graphs (think graph theory, not plotting)."""
from __future__ import annotations
__all__ = [
"Graph",
"DiGraph",
]
import itertools as it
from copy import copy
from typing import Hashable, Iterable
import networkx as nx
import numpy as np
from manim.animation.comp... |
manim_ManimCommunity/manim/mobject/frame.py | """Special rectangles."""
from __future__ import annotations
__all__ = [
"ScreenRectangle",
"FullScreenRectangle",
]
from manim.mobject.geometry.polygram import Rectangle
from .. import config
class ScreenRectangle(Rectangle):
def __init__(self, aspect_ratio=16.0 / 9.0, height=4, **kwargs):
s... |
manim_ManimCommunity/manim/mobject/table.py | r"""Mobjects representing tables.
Examples
--------
.. manim:: TableExamples
:save_last_frame:
class TableExamples(Scene):
def construct(self):
t0 = Table(
[["First", "Second"],
["Third","Fourth"]],
row_labels=[Text("R1"), Text("R2")],
... |
manim_ManimCommunity/manim/mobject/utils.py | """Utilities for working with mobjects."""
from __future__ import annotations
__all__ = [
"get_mobject_class",
"get_point_mobject_class",
"get_vectorized_mobject_class",
]
from .._config import config
from ..constants import RendererType
from .mobject import Mobject
from .opengl.opengl_mobject import Ope... |
manim_ManimCommunity/manim/mobject/vector_field.py | """Mobjects representing vector fields."""
from __future__ import annotations
__all__ = [
"VectorField",
"ArrowVectorField",
"StreamLines",
]
import itertools as it
import random
from math import ceil, floor
from typing import Callable, Iterable, Sequence
import numpy as np
from PIL import Image
from m... |
manim_ManimCommunity/manim/mobject/three_d/__init__.py | """Three-dimensional mobjects.
Modules
=======
.. autosummary::
:toctree: ../reference
~polyhedra
~three_d_utils
~three_dimensions
"""
|
manim_ManimCommunity/manim/mobject/three_d/three_dimensions.py | """Three-dimensional mobjects."""
from __future__ import annotations
from manim.typing import Point3D, Vector3D
from manim.utils.color import BLUE, BLUE_D, BLUE_E, LIGHT_GREY, WHITE, interpolate_color
__all__ = [
"ThreeDVMobject",
"Surface",
"Sphere",
"Dot3D",
"Cube",
"Prism",
"Cone",
... |
manim_ManimCommunity/manim/mobject/three_d/three_d_utils.py | """Utility functions for three-dimensional mobjects."""
from __future__ import annotations
__all__ = [
"get_3d_vmob_gradient_start_and_end_points",
"get_3d_vmob_start_corner_index",
"get_3d_vmob_end_corner_index",
"get_3d_vmob_start_corner",
"get_3d_vmob_end_corner",
"get_3d_vmob_unit_normal",... |
manim_ManimCommunity/manim/mobject/three_d/polyhedra.py | """General polyhedral class and platonic solids."""
from __future__ import annotations
from typing import TYPE_CHECKING
import numpy as np
from manim.mobject.geometry.polygram import Polygon
from manim.mobject.graph import Graph
from manim.mobject.three_d.three_dimensions import Dot3D
from manim.mobject.types.vecto... |
manim_ManimCommunity/manim/mobject/text/code_mobject.py | """Mobject representing highlighted source code listings."""
from __future__ import annotations
__all__ = [
"Code",
]
import html
import os
import re
from pathlib import Path
import numpy as np
from pygments import highlight
from pygments.formatters.html import HtmlFormatter
from pygments.lexers import get_lexe... |
manim_ManimCommunity/manim/mobject/text/text_mobject.py | """Mobjects used for displaying (non-LaTeX) text.
.. note::
Just as you can use :class:`~.Tex` and :class:`~.MathTex` (from the module :mod:`~.tex_mobject`)
to insert LaTeX to your videos, you can use :class:`~.Text` to to add normal text.
.. important::
See the corresponding tutorial :ref:`using-text-objec... |
manim_ManimCommunity/manim/mobject/text/__init__.py | """Mobjects used to display Text using Pango or LaTeX.
Modules
=======
.. autosummary::
:toctree: ../reference
~code_mobject
~numbers
~tex_mobject
~text_mobject
"""
|
manim_ManimCommunity/manim/mobject/text/numbers.py | """Mobjects representing numbers."""
from __future__ import annotations
__all__ = ["DecimalNumber", "Integer", "Variable"]
from typing import Sequence
import numpy as np
from manim import config
from manim.constants import *
from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL
from manim.mobject.t... |
manim_ManimCommunity/manim/mobject/text/tex_mobject.py | r"""Mobjects representing text rendered using LaTeX.
.. important::
See the corresponding tutorial :ref:`rendering-with-latex`
.. note::
Just as you can use :class:`~.Text` (from the module :mod:`~.text_mobject`) to add text to your videos, you can use :class:`~.Tex` and :class:`~.MathTex` to insert LaTeX.
"... |
manim_ManimCommunity/manim/mobject/opengl/opengl_point_cloud_mobject.py | from __future__ import annotations
__all__ = ["OpenGLPMobject", "OpenGLPGroup", "OpenGLPMPoint"]
import moderngl
import numpy as np
from manim.constants import *
from manim.mobject.opengl.opengl_mobject import OpenGLMobject
from manim.utils.bezier import interpolate
from manim.utils.color import BLACK, WHITE, YELLOW... |
manim_ManimCommunity/manim/mobject/opengl/__init__.py | |
manim_ManimCommunity/manim/mobject/opengl/opengl_surface.py | from __future__ import annotations
from pathlib import Path
from typing import Iterable
import moderngl
import numpy as np
from PIL import Image
from manim.constants import *
from manim.mobject.opengl.opengl_mobject import OpenGLMobject
from manim.utils.bezier import integer_interpolate, interpolate
from manim.utils... |
manim_ManimCommunity/manim/mobject/opengl/opengl_three_dimensions.py | from __future__ import annotations
import numpy as np
from manim.mobject.opengl.opengl_surface import OpenGLSurface
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVGroup, OpenGLVMobject
__all__ = ["OpenGLSurfaceMesh"]
class OpenGLSurfaceMesh(OpenGLVGroup):
def __init__(
self,
... |
manim_ManimCommunity/manim/mobject/opengl/opengl_image_mobject.py | from __future__ import annotations
__all__ = [
"OpenGLImageMobject",
]
from pathlib import Path
import numpy as np
from PIL import Image
from PIL.Image import Resampling
from manim.mobject.opengl.opengl_surface import OpenGLSurface, OpenGLTexturedSurface
from manim.utils.images import get_full_raster_image_path... |
manim_ManimCommunity/manim/mobject/opengl/opengl_geometry.py | from __future__ import annotations
import numpy as np
from manim.constants import *
from manim.mobject.mobject import Mobject
from manim.mobject.opengl.opengl_vectorized_mobject import (
OpenGLDashedVMobject,
OpenGLVGroup,
OpenGLVMobject,
)
from manim.utils.color import *
from manim.utils.iterables import... |
manim_ManimCommunity/manim/mobject/opengl/opengl_vectorized_mobject.py | from __future__ import annotations
import itertools as it
import operator as op
from functools import reduce, wraps
from typing import Callable, Iterable, Sequence
import moderngl
import numpy as np
from manim import config
from manim.constants import *
from manim.mobject.opengl.opengl_mobject import OpenGLMobject, ... |
manim_ManimCommunity/manim/mobject/opengl/opengl_mobject.py | from __future__ import annotations
import copy
import inspect
import itertools as it
import random
import sys
from functools import partialmethod, wraps
from math import ceil
from typing import Iterable, Sequence
import moderngl
import numpy as np
from manim import config, logger
from manim.constants import *
from m... |
manim_ManimCommunity/manim/mobject/opengl/dot_cloud.py | from __future__ import annotations
__all__ = ["TrueDot", "DotCloud"]
import numpy as np
from manim.constants import ORIGIN, RIGHT, UP
from manim.mobject.opengl.opengl_point_cloud_mobject import OpenGLPMobject
from manim.utils.color import YELLOW
class DotCloud(OpenGLPMobject):
def __init__(
self, color... |
manim_ManimCommunity/manim/mobject/opengl/opengl_compatibility.py | from __future__ import annotations
from abc import ABCMeta
from manim import config
from manim.mobject.opengl.opengl_mobject import OpenGLMobject
from manim.mobject.opengl.opengl_point_cloud_mobject import OpenGLPMobject
from manim.mobject.opengl.opengl_three_dimensions import OpenGLSurface
from manim.mobject.opengl.... |
manim_ManimCommunity/manim/mobject/svg/svg_mobject.py | """Mobjects generated from an SVG file."""
from __future__ import annotations
import os
from pathlib import Path
from xml.etree import ElementTree as ET
import numpy as np
import svgelements as se
from manim import config, logger
from ...constants import RIGHT
from ...utils.bezier import get_quadratic_approximatio... |
manim_ManimCommunity/manim/mobject/svg/__init__.py | """Mobjects related to SVG images.
Modules
=======
.. autosummary::
:toctree: ../reference
~brace
~svg_mobject
"""
|
manim_ManimCommunity/manim/mobject/svg/brace.py | """Mobject representing curly braces."""
from __future__ import annotations
__all__ = ["Brace", "BraceLabel", "ArcBrace", "BraceText", "BraceBetweenPoints"]
from typing import Sequence
import numpy as np
import svgelements as se
from manim._config import config
from manim.mobject.geometry.arc import Arc
from manim... |
manim_ManimCommunity/manim/mobject/graphing/__init__.py | """Coordinate systems and function graphing related mobjects.
Modules
=======
.. autosummary::
:toctree: ../reference
~coordinate_systems
~functions
~number_line
~probability
~scale
"""
|
manim_ManimCommunity/manim/mobject/graphing/coordinate_systems.py | """Mobjects that represent coordinate systems."""
from __future__ import annotations
__all__ = [
"CoordinateSystem",
"Axes",
"ThreeDAxes",
"NumberPlane",
"PolarPlane",
"ComplexPlane",
]
import fractions as fr
import numbers
from typing import TYPE_CHECKING, Any, Callable, Iterable, Sequence,... |
manim_ManimCommunity/manim/mobject/graphing/number_line.py | """Mobject representing a number line."""
from __future__ import annotations
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject
__all__ = ["NumberLine", "UnitInterval"]
from typing import TYPE_CHECKING, Callable, Iterable, Sequence
if TYPE_CHECKING:
from manim.mobject.geometry.tips impo... |
manim_ManimCommunity/manim/mobject/graphing/functions.py | """Mobjects representing function graphs."""
from __future__ import annotations
__all__ = ["ParametricFunction", "FunctionGraph", "ImplicitFunction"]
from typing import Callable, Iterable, Sequence
import numpy as np
from isosurfaces import plot_isoline
from manim import config
from manim.mobject.graphing.scale i... |
manim_ManimCommunity/manim/mobject/graphing/probability.py | """Mobjects representing objects from probability theory and statistics."""
from __future__ import annotations
__all__ = ["SampleSpace", "BarChart"]
from typing import Iterable, MutableSequence, Sequence
import numpy as np
from manim import config, logger
from manim.constants import *
from manim.mobject.geometry.... |
manim_ManimCommunity/manim/mobject/graphing/scale.py | from __future__ import annotations
import math
from typing import TYPE_CHECKING, Any, Iterable
import numpy as np
__all__ = ["LogBase", "LinearBase"]
from manim.mobject.text.numbers import Integer
if TYPE_CHECKING:
from manim.mobject.mobject import Mobject
class _ScaleBase:
"""Scale baseclass for graphin... |
manim_ManimCommunity/manim/mobject/geometry/line.py | r"""Mobjects that are lines or variations of them."""
from __future__ import annotations
__all__ = [
"Line",
"DashedLine",
"TangentLine",
"Elbow",
"Arrow",
"Vector",
"DoubleArrow",
"Angle",
"RightAngle",
]
from typing import TYPE_CHECKING
import numpy as np
from typing_extensions... |
manim_ManimCommunity/manim/mobject/geometry/__init__.py | """Various geometric Mobjects.
Modules
=======
.. autosummary::
:toctree: ../reference
~arc
~boolean_ops
~labeled
~line
~polygram
~shape_matchers
~tips
"""
|
manim_ManimCommunity/manim/mobject/geometry/polygram.py | r"""Mobjects that are simple geometric shapes."""
from __future__ import annotations
__all__ = [
"Polygram",
"Polygon",
"RegularPolygram",
"RegularPolygon",
"Star",
"Triangle",
"Rectangle",
"Square",
"RoundedRectangle",
"Cutout",
]
from math import ceil
from typing import TYP... |
manim_ManimCommunity/manim/mobject/geometry/tips.py | r"""A collection of tip mobjects for use with :class:`~.TipableVMobject`."""
from __future__ import annotations
__all__ = [
"ArrowTip",
"ArrowCircleFilledTip",
"ArrowCircleTip",
"ArrowSquareTip",
"ArrowSquareFilledTip",
"ArrowTriangleTip",
"ArrowTriangleFilledTip",
"StealthTip",
]
fro... |
manim_ManimCommunity/manim/mobject/geometry/arc.py | r"""Mobjects that are curved.
Examples
--------
.. manim:: UsefulAnnotations
:save_last_frame:
class UsefulAnnotations(Scene):
def construct(self):
m0 = Dot()
m1 = AnnotationDot()
m2 = LabeledDot("ii")
m3 = LabeledDot(MathTex(r"\alpha").set_color(ORANGE)... |
manim_ManimCommunity/manim/mobject/geometry/boolean_ops.py | """Boolean operations for two-dimensional mobjects."""
from __future__ import annotations
from typing import TYPE_CHECKING
import numpy as np
from pathops import Path as SkiaPath
from pathops import PathVerb, difference, intersection, union, xor
from manim import config
from manim.mobject.opengl.opengl_compatibilit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.