Sideway
output.to from Sideway
Draft for Information Only

Content

Manim Coordinate System
 Codes in Coordinate_systems.py
  Import
  Class CoordinateSystem()
   Configuration
   Functions
  Class Axes(VGroup, CoordinateSystem)
   Configuration
   Functions
  Class ThreeDAxes(Axes)
   Configuration
   Functions
  Class NumberPlane(Axes)
   Configuration
   Functions
  Class ComplexPlane(NumberPlane)
   Configuration
   Functions
 Tree Structure
 Source and Reference

Manim Coordinate System

The physical position of a Mobject object in Manim is based on a Cartesian rectangular coordinate system. Coordinate System VMobject objects are used to visualize the coordinate system of Scene object.

Codes in Coordinate_systems.py

Available codes defined in manimlib.mobject.coordinate_systems.py

image

Five classes, CoordinateSystem, Axes, ThreeDAxes, NumberPlane, and ComplexPlane are defined.

Import

The import defined in manimlib.mobject.coordinate_systems.py:
import numpy as np
import numbers

from manimlib.constants import *
from manimlib.mobject.functions import ParametricFunction
from manimlib.mobject.geometry import Arrow
from manimlib.mobject.geometry import Line
from manimlib.mobject.number_line import NumberLine
from manimlib.mobject.svg.tex_mobject import TexMobject
from manimlib.mobject.types.vectorized_mobject import VGroup
from manimlib.utils.config_ops import digest_config
from manimlib.utils.config_ops import merge_dicts_recursively
from manimlib.utils.simple_functions import binary_search
from manimlib.utils.space_ops import angle_of_vector

Class CoordinateSystem()

class manimlib.mobject.coordinate_systems.CoordinateSystem()version 19Dec2019

Configuration

    CONFIG = {
        "dimension": 2,
        "x_min": -FRAME_X_RADIUS,
        "x_max": FRAME_X_RADIUS,
        "y_min": -FRAME_Y_RADIUS,
        "y_max": FRAME_Y_RADIUS,
    }

Functions

Functions defined in class CoordinateSystem are
  • """Abstract class for Axes and NumberPlane"""
  • def coords_to_point(self, *coords)
    • raise Exception
  • def point_to_coords(self, point)
    • raise Exception
  • def c2p(self, *coords)
    • raise Exception
  • def p2c(self, point)
    • raise Exception
  • def get_axes(self)
    • raise Exception
  • def get_axis(self, index)
  • def get_x_axis(self)
  • def get_y_axis(self)
  • def get_z_axis(self)
  • def get_x_axis_label(self, label_tex, edge=RIGHT, direction=DL, **kwargs)
  • def get_y_axis_label(self, label_tex, edge=UP, direction=DR, **kwargs)
  • def get_axis_label(self, label_tex, axis, edge, direction, buff=MED_SMALL_BUFF)
  • def get_axis_labels(self, x_label_tex="x", y_label_tex="y")
  • def get_graph(self, function, **kwargs)
  • def get_parametric_curve(self, function, **kwargs)
  • def input_to_graph_point(self, x, graph)

Class Axes(VGroup, CoordinateSystem)

class manimlib.mobject.coordinate_systems.Axes(VGroup, CoordinateSystem)version 19Dec2019

Configuration

    CONFIG = {
        "number_line_config": {
            "color": LIGHT_GREY,
            "include_tip": True,
            "exclude_zero_from_default_numbers": True,
        },
        "x_axis_config": {},
        "y_axis_config": {
            "label_direction": LEFT,
        },
        "center_point": ORIGIN,
    }

Functions

Functions defined in class Axes are
  • def __init__(self, **kwargs)
  • def create_axis(self, min_val, max_val, axis_config)
  • def coords_to_point(self, *coords)
  • def c2p(self, *coords)
  • def point_to_coords(self, point)
  • def p2c(self, point)
  • def get_axes(self)
  • def get_coordinate_labels(self, x_vals=None, y_vals=None)
  • def add_coordinates(self, x_vals=None, y_vals=None)

Class ThreeDAxes(Axes)

class manimlib.mobject.coordinate_systems.ThreeDAxes(Axes)version 19Dec2019

Configuration

    CONFIG = {
        "dimension": 3,
        "x_min": -5.5,
        "x_max": 5.5,
        "y_min": -5.5,
        "y_max": 5.5,
        "z_axis_config": {},
        "z_min": -3.5,
        "z_max": 3.5,
        "z_normal": DOWN,
        "num_axis_pieces": 20,
        "light_source": 9 * DOWN + 7 * LEFT + 10 * OUT,
    }

Functions

Functions defined in class ThreeDAxes are
  • def __init__(self, **kwargs)
  • def add_3d_pieces(self)
  • def set_axis_shading(self)
    • def make_func(axis)

Class NumberPlane(Axes)

class manimlib.mobject.coordinate_systems.NumberPlane(Axes)version 19Dec2019

Configuration


    CONFIG = {
        "axis_config": {
            "stroke_color": WHITE,
            "stroke_width": 2,
            "include_ticks": False,
            "include_tip": False,
            "line_to_number_buff": SMALL_BUFF,
            "label_direction": DR,
            "number_scale_val": 0.5,
        },
        "y_axis_config": {
            "label_direction": DR,
        },
        "background_line_style": {
            "stroke_color": BLUE_D,
            "stroke_width": 2,
            "stroke_opacity": 1,
        },
        # Defaults to a faded version of line_config
        "faded_line_style": None,
        "x_line_frequency": 1,
        "y_line_frequency": 1,
        "faded_line_ratio": 1,
        "make_smooth_after_applying_functions": True,
    }
     

Functions

Functions defined in class NumberPlane are
  • def __init__(self, **kwargs)
  • def init_background_lines(self)
  • def get_lines(self)
  • def get_lines_parallel_to_axis(self, axis1, axis2, freq, ratio)
  • def get_center_point(self)
  • def get_x_unit_size(self)
  • def get_y_unit_size(self)
  • def get_axes(self)
  • def get_vector(self, coords, **kwargs)
  • def prepare_for_nonlinear_transform(self, num_inserted_curves=50)

Class ComplexPlane(NumberPlane)

class manimlib.mobject.coordinate_systems.ComplexPlane(NumberPlane)version 19Dec2019

Configuration

    CONFIG = {
        "color": BLUE,
        "line_frequency": 1,
    }

Functions

Functions defined in class ComplexPlane are
  • def number_to_point(self, number)
  • def n2p(self, number)
  • def point_to_number(self, point)
  • def p2n(self, point)
  • def get_default_coordinate_values(self)
  • def get_coordinate_labels(self, *numbers, **kwargs)
  • def add_coordinates(self, *numbers)

Tree Structure

Source and Reference

https://github.com/3b1b/manim19Dec2019

©sideway

ID: 200301602 Last Updated: 3/16/2020 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339new

Travel 7new

Reference 79

Computer

Hardware 251

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019