Draft for Information Only
Content
Manim Vector_space_scene.py Codes in Vector_space_scene.py Import Constant Class VectorScene(Scene) Configuration Functions Class LinearTransformationScene(VectorScene) Configuration Functions Source and Reference
Manim Vector_space_scene.py
Codes in Vector_space_scene.py
Available codes defined in manimlib.scene.vector_space_scene.py
Import
import numpy as np
from manimlib.animation.animation import Animation
from manimlib.animation.creation import ShowCreation
from manimlib.animation.creation import Write
from manimlib.animation.fading import FadeOut
from manimlib.animation.growing import GrowArrow
from manimlib.animation.transform import ApplyFunction
from manimlib.animation.transform import ApplyPointwiseFunction
from manimlib.animation.transform import Transform
from manimlib.constants import *
from manimlib.mobject.coordinate_systems import Axes
from manimlib.mobject.coordinate_systems import NumberPlane
from manimlib.mobject.geometry import Arrow
from manimlib.mobject.geometry import Dot
from manimlib.mobject.geometry import Line
from manimlib.mobject.geometry import Rectangle
from manimlib.mobject.geometry import Vector
from manimlib.mobject.matrix import Matrix
from manimlib.mobject.matrix import VECTOR_LABEL_SCALE_FACTOR
from manimlib.mobject.matrix import vector_coordinate_label
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.svg.tex_mobject import TexMobject
from manimlib.mobject.svg.tex_mobject import TextMobject
from manimlib.mobject.types.vectorized_mobject import VGroup
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.scene.scene import Scene
from manimlib.utils.rate_functions import rush_from
from manimlib.utils.rate_functions import rush_into
from manimlib.utils.space_ops import angle_of_vector
from manimlib.utils.space_ops import get_norm
Constant
X_COLOR = GREEN_C
Y_COLOR = RED_C
Z_COLOR = BLUE_D
Class VectorScene(Scene)
class manimlib.scene.vector_space_scene.VectorScene(Scene)version 19Dec2019
Configuration
CONFIG = {
"basis_vector_stroke_width": 6
}
Functions
- def add_plane(self, animate=False, **kwargs)
- def add_axes(self, animate=False, color=WHITE, **kwargs)
- def lock_in_faded_grid(self, dimness=0.7, axes_dimness=0.5)
- def get_vector(self, numerical_vector, **kwargs)
- def add_vector(self, vector, color=YELLOW, animate=True, **kwargs)
- def write_vector_coordinates(self, vector, **kwargs)
- def get_basis_vectors(self, i_hat_color=X_COLOR, j_hat_color=Y_COLOR)
- def get_basis_vector_labels(self, **kwargs)
- def get_vector_label(self, vector, label,
at_tip=False,
direction="left",
rotate=False,
color=None,
label_scale_factor=VECTOR_LABEL_SCALE_FACTOR)
- def label_vector(self, vector, label, animate=True, **kwargs)
- def position_x_coordinate(self, x_coord, x_line, vector)
- def position_y_coordinate(self, y_coord, y_line, vector)
- def coords_to_vector(self, vector, coords_start=2 * RIGHT + 2 * UP, clean_up=True)
- def vector_to_coords(self, vector, integer_labels=True, clean_up=True)
- def show_ghost_movement(self, vector)
Class LinearTransformationScene(VectorScene)
class manimlib.scene.vector_space_scene.LinearTransformationScene(VectorScene)version 19Dec2019
Configuration
CONFIG = {
"include_background_plane": True,
"include_foreground_plane": True,
"foreground_plane_kwargs": {
"x_max": FRAME_WIDTH / 2,
"x_min": -FRAME_WIDTH / 2,
"y_max": FRAME_WIDTH / 2,
"y_min": -FRAME_WIDTH / 2,
"faded_line_ratio": 0
},
"background_plane_kwargs": {
"color": GREY,
"axis_config": {
"stroke_color": LIGHT_GREY,
},
"number_line_config": {
"color": GREY,
},
"background_line_style": {
"stroke_color": GREY,
"stroke_width": 1,
},
},
"show_coordinates": False,
"show_basis_vectors": True,
"basis_vector_stroke_width": 6,
"i_hat_color": X_COLOR,
"j_hat_color": Y_COLOR,
"leave_ghost_vectors": False,
"t_matrix": [[3, 0], [1, 2]],
}
Functions
- def setup(self)
- def add_special_mobjects(self, mob_list, *mobs_to_add)
- def add_background_mobject(self, *mobjects)
- def add_foreground_mobject(self, *mobjects)
- def add_transformable_mobject(self, *mobjects)
- def add_moving_mobject(self, mobject, target_mobject=None)
- def get_unit_square(self, color=YELLOW, opacity=0.3, stroke_width=3)
- def add_unit_square(self, animate=False, **kwargs)
- def add_vector(self, vector, color=YELLOW, **kwargs)
- def write_vector_coordinates(self, vector, **kwargs)
- def add_transformable_label(
self, vector, label,
transformation_name="L",
new_label=None,
**kwargs)
- def add_title(self, title, scale_factor=1.5, animate=False)
- def get_matrix_transformation(self, matrix)
- def get_transposed_matrix_transformation(self, transposed_matrix)
- def get_piece_movement(self, pieces)
- def get_moving_mobject_movement(self, func)
- def get_vector_movement(self, func)
- def get_transformable_label_movement(self)
- def apply_matrix(self, matrix, **kwargs)
- def apply_inverse(self, matrix, **kwargs)
- def apply_transposed_matrix(self, transposed_matrix, **kwargs)
- def apply_inverse_transpose(self, t_matrix, **kwargs)
- def apply_nonlinear_transformation(self, function, **kwargs)
- def apply_function(self, function, added_anims=[], **kwargs)
Source and Reference
https://github.com/3b1b/manim 19Dec2019
©sideway
ID: 200701002 Last Updated: 7/10/2020 Revision: 0
|
|