Sideway
output.to from Sideway
`-=[]โŸจโŸฉ\;',./~!@#$%^&*()_+{}|:"<>? ๐‘Ž๐‘๐‘๐‘‘๐‘’๐‘“๐‘”โ„Ž๐‘–๐‘—๐‘˜๐‘™๐‘š๐‘›๐‘œ๐‘๐‘ž๐‘Ÿ๐‘ ๐‘ก๐‘ข๐‘ฃ๐‘ค๐‘ฅ๐‘ฆ๐‘ง ร…โ€‰โˆ’โ€‚ร—โ€ƒโ‹…โˆ“ยฑโˆ˜๊žŠ๏นฆโˆ—โˆ™ โ„ฏ ๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘Š๐‘‹๐‘Œ๐‘ โˆผโˆฝโˆพโ‰โ‰‚โ‰ƒโ‰„โ‰…โ‰†โ‰‡โ‰ˆโ‰‰โ‰Œโ‰โ‰ โ‰ก โ‰คโ‰ฅโ‰ฆโ‰งโ‰จโ‰ฉโ‰ชโ‰ซ โˆˆโˆ‰โˆŠโˆ‹โˆŒโˆ โŠ‚โŠƒโŠ„โŠ…โІโЇ ๐›ผ๐›ฝ๐›พ๐›ฟ๐œ€๐œ๐œ‚๐œƒ๐œ„๐œ…๐œ†๐œ‡๐œˆ๐œ‰๐œŠ๐œ‹๐œŒ๐œŽ๐œ๐œ๐œ‘๐œ’๐œ“๐œ” โˆ€โˆ‚โˆƒโˆ…โฆฐโˆ†โˆ‡โˆŽโˆžโˆโˆดโˆต โˆโˆโˆ‘โ‹€โ‹โ‹‚โ‹ƒ โˆงโˆจโˆฉโˆช โˆซโˆฌโˆญโˆฎโˆฏโˆฐโˆฑโˆฒโˆณ โˆฅโ‹ฎโ‹ฏโ‹ฐโ‹ฑ โ€– โ€ฒ โ€ณ โ€ด โ„ โ— สน สบ โ€ต โ€ถ โ€ท ๏น ๏น‚ ๏นƒ ๏น„ ๏ธน ๏ธบ ๏ธป ๏ธผ ๏ธ— ๏ธ˜ ๏ธฟ ๏น€ ๏ธฝ ๏ธพ ๏น‡ ๏นˆ ๏ธท ๏ธธ โœ   โ   โŽด  โŽต  โž   โŸ   โ    โก โ†โ†‘โ†’โ†“โ†คโ†ฆโ†ฅโ†งโ†”โ†•โ†–โ†—โ†˜โ†™โ–ฒโ–ผโ—€โ–ถโ†บโ†ปโŸฒโŸณ โ†ผโ†ฝโ†พโ†ฟโ‡€โ‡โ‡‚โ‡ƒโ‡„โ‡…โ‡†โ‡‡ โ‡โ‡‘โ‡’โ‡“โ‡”โ‡Œโ‡โ‡โ‡•โ‡–โ‡—โ‡˜โ‡™โ‡™โ‡ณโฅขโฅฃโฅคโฅฅโฅฆโฅงโฅจโฅฉโฅชโฅซโฅฌโฅญโฅฎโฅฏ
Draft for Information Only

Content

Manim VMobject
โ€ƒCodes in Mobject.types.vectorized_mobject.py
โ€ƒโ€ƒImport
โ€ƒโ€ƒClass VMobject(Mobject)
โ€ƒโ€ƒโ€ƒConfiguration of VMobject
โ€ƒโ€ƒโ€ƒFunctions
โ€ƒโ€ƒClass VGroup(VMobject)
โ€ƒโ€ƒโ€ƒFunctions
โ€ƒโ€ƒClass VectorizedPoint(VMobject)
โ€ƒโ€ƒโ€ƒConfiguration
โ€ƒโ€ƒโ€ƒFunctions
โ€ƒโ€ƒClass CurvesAsSubmobjects(VGroup)
โ€ƒโ€ƒโ€ƒFunctions
โ€ƒโ€ƒClass DashedVMobject(VMobject)
โ€ƒโ€ƒโ€ƒConfiguration
โ€ƒโ€ƒโ€ƒFunctions
โ€ƒSource and Reference

Manim VMobject

VMobject is a Vectorized Mobject. Vector graphics techniques are used to generate 2D graphics and 3D rendering in addition to a ordinary Mobject. A VMobject object is the key element used in Manim as a dummy vmobject container with base vmobject manipulating functions. A VMobject object focuses only on the internal structural design of a VMobject object.

Codes in Mobject.types.vectorized_mobject.py

Available codes defined in manimlib.mobject.types.vectorized_mobject.py

image

Five classes, VMobject, VGroup, VectorizedPoint, CurvesAsSubmobjects, and DashedVMobject are defined.

Import

The import defined in manimlib.mobject.types.vectorized_mobject.py:
import itertools as it
import sys

from colour import Color

from manimlib.constants import *
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.three_d_utils import get_3d_vmob_gradient_start_and_end_points
from manimlib.utils.bezier import bezier
from manimlib.utils.bezier import get_smooth_handle_points
from manimlib.utils.bezier import interpolate
from manimlib.utils.bezier import integer_interpolate
from manimlib.utils.bezier import partial_bezier_points
from manimlib.utils.color import color_to_rgba
from manimlib.utils.iterables import make_even
from manimlib.utils.iterables import stretch_array_to_length
from manimlib.utils.iterables import tuplify
from manimlib.utils.simple_functions import clip_in_place
from manimlib.utils.space_ops import rotate_vector
from manimlib.utils.space_ops import get_norm

Class VMobject(Mobject)

class manimlib.mobject.types.vectorized_mobject.VMobject(Mobject)version 19Dec2019

Configuration of VMobject

The configuration of a VMobject is defined in manimlib.mobject.types.vectorized_mobject.py
    CONFIG = {
        "fill_color": None,
        "fill_opacity": 0.0,
        "stroke_color": None,
        "stroke_opacity": 1.0,
        "stroke_width": DEFAULT_STROKE_WIDTH,
        # The purpose of background stroke is to have
        # something that won't overlap the fill, e.g.
        # For text against some textured background
        "background_stroke_color": BLACK,
        "background_stroke_opacity": 1.0,
        "background_stroke_width": 0,
        # When a color c is set, there will be a second color
        # computed based on interpolating c to WHITE by with
        # sheen_factor, and the display will gradient to this
        # secondary color in the direction of sheen_direction.
        "sheen_factor": 0.0,
        "sheen_direction": UL,
        # Indicates that it will not be displayed, but
        # that it should count in parent mobject's path
        "close_new_points": False,
        "pre_function_handle_to_anchor_scale_factor": 0.01,
        "make_smooth_after_applying_functions": False,
        "background_image_file": None,
        "shade_in_3d": False,
        # This is within a pixel
        # TODO, do we care about accounting for
        # varying zoom levels?
        "tolerance_for_point_equality": 1e-6,
        "n_points_per_cubic_curve": 4,
    }

Functions

Functions defined in class Mobject are
  • def get_group_class(self)
  • # Colors
  • def init_colors(self)
  • def generate_rgbas_array(self, color, opacity)
  • def update_rgbas_array(self, array_name, color=None, opacity=None)
  • def set_fill(self, color=None, opacity=None, family=True)
  • def set_stroke(self, color=None, width=None, opacity=None, background=False, family=True)
  • def set_background_stroke(self, **kwargs)
  • def set_style(self, fill_color=None, fill_opacity=None, stroke_color=None, stroke_width=None, stroke_opacity=None, background_stroke_color=None, background_stroke_width=None, background_stroke_opacity=None, sheen_factor=None, sheen_direction=None, background_image_file=None, family=True)
  • def get_style(self)
  • def match_style(self, vmobject, family=True)
  • def set_color(self, color, family=True)
  • def set_opacity(self, opacity, family=True)
  • def fade(self, darkness=0.5, family=True)
  • def get_fill_rgbas(self)
  • def get_fill_color(self)
  • def get_fill_opacity(self)
  • def get_fill_colors(self)
  • def get_fill_opacities(self)
  • def get_stroke_rgbas(self, background=False)
  • def get_stroke_color(self, background=False)
  • def get_stroke_width(self, background=False)
  • def get_stroke_opacity(self, background=False)
  • def get_stroke_colors(self, background=False)
  • def get_stroke_opacities(self, background=False)
  • def get_color(self)
  • def set_sheen_direction(self, direction, family=True)
  • def set_sheen(self, factor, direction=None, family=True)
  • def get_sheen_direction(self)
  • def get_sheen_factor(self)
  • def get_gradient_start_and_end_points(self)
  • def color_using_background_image(self, background_image_file)
  • def get_background_image_file(self)
  • def match_background_image_file(self, vmobject)
  • def set_shade_in_3d(self, value=True, z_index_as_group=False)
  • # Points
  • def set_points(self, points)
  • def get_points(self)
  • def set_anchors_and_handles(self, anchors1, handles1, handles2, anchors2)
  • def clear_points(self)
  • def append_points(self, new_points)
  • def start_new_path(self, point)
  • def add_cubic_bezier_curve(self, anchor1, handle1, handle2, anchor2)
  • def add_cubic_bezier_curve_to(self, handle1, handle2, anchor)
  • def add_line_to(self, point)
  • def add_smooth_curve_to(self, *points)
  • def has_new_path_started(self)
  • def get_last_point(self)
  • def is_closed(self)
  • def add_points_as_corners(self, points)
  • def set_points_as_corners(self, points)
  • def set_points_smoothly(self, points)
  • def change_anchor_mode(self, mode)
  • def make_smooth(self)
  • def make_jagged(self)
  • def add_subpath(self, points)
  • def append_vectorized_mobject(self, vectorized_mobject)
  • def apply_function(self, function)
  • def scale_handle_to_anchor_distances(self, factor)
  • #
  • def consider_points_equals(self, p0, p1)
  • # Information about line
  • def get_cubic_bezier_tuples_from_points(self, points)
  • def get_cubic_bezier_tuples(self)
  • def get_subpaths_from_points(self, points)
  • def get_subpaths(self)
  • def get_nth_curve_points(self, n)
  • def get_nth_curve_function(self, n)
  • def get_num_curves(self)
  • def point_from_proportion(self, alpha)
  • def get_anchors_and_handles(self)
  • def get_start_anchors(self)
  • def get_end_anchors(self)
  • def get_anchors(self)
  • def get_points_defining_boundary(self)
  • def get_arc_length(self, n_sample_points=None)
  • # Alignment
  • def align_points(self, vmobject)
    • def get_nth_subpath(path_list, n)
  • def insert_n_curves(self, n)
  • def insert_n_curves_to_point_list(self, n, points)
  • def align_rgbas(self, vmobject)
  • def get_point_mobject(self, center=None)
  • def interpolate_color(self, mobject1, mobject2, alpha)
  • def pointwise_become_partial(self, vmobject, a, b)
  • def get_subcurve(self, a, b)

Class VGroup(VMobject)

class manimlib.mobject.types.vectorized_mobject.VGroup(VMobject)version 19Dec2019

Functions

Functions defined in class VGroup are
  • def __init__(self, *vmobjects, **kwargs)

Class VectorizedPoint(VMobject)

class manimlib.mobject.types.vectorized_mobject.VectorizedPoint(VMobject)version 19Dec2019

Configuration

The configuration is defined in manimlib.mobject.types.vectorized_mobject.py
    CONFIG = {
        "color": BLACK,
        "fill_opacity": 0,
        "stroke_width": 0,
        "artificial_width": 0.01,
        "artificial_height": 0.01,
    }

Functions

Functions defined in class VectorizedPoint are
  • def __init__(self, location=ORIGIN, **kwargs)
  • def get_width(self)
  • def get_height(self)
  • def get_location(self)
  • def set_location(self, new_loc)

Class CurvesAsSubmobjects(VGroup)

class manimlib.mobject.types.vectorized_mobject.CurvesAsSubmobjects(VGroup)version 19Dec2019

Functions

Functions defined in class CurvesAsSubmobjects are
  • def __init__(self, vmobject, **kwargs)

Class DashedVMobject(VMobject)

class manimlib.mobject.types.vectorized_mobject.DashedVMobject(VMobject)version 19Dec2019

Configuration

The configuration is defined in manimlib.mobject.types.vectorized_mobject.py
    CONFIG = {
        "num_dashes": 15,
        "positive_space_ratio": 0.5,
        "color": WHITE
    }

Functions

Functions defined in class DashedVMobject(VMobject) are
  • def __init__(self, vmobject, **kwargs)

Source and Reference

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

ยฉsideway

ID: 210700031 Last Updated: 7/31/2021 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 9

Culture

Chinese 1097

English 339

Travel 38

Reference 79

Hardware 55

Computer

Hardware 259

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 290new

Unicode 504

HTML 66new

Common Color 1new

Html Entity (Unicode) 1new

Html 401 Special 1

CSS 65new

Selector 1

SVG 46

ASP.NET 270

OS 447new

MS Windows

Windows10 1new

.NET Framework 1

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 207new

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-2026 Sideway . All rights reserved Disclaimers last modified on 06 September 2019