Sideway
output.to from Sideway
Draft for Information Only

Content

Manim SVG Mobject
 Codes in Svg_mobject.py
  Import
  Global Function
  Class SVGMobject(VMobject)
   Configuration
   Functions
  Class VMobjectFromSVGPathstring(VMobject)
   Functions
 Source and Reference

Manim SVG Mobject

The svg mobject VMobject object in Manim is defined in svg_mobject.py.

Codes in Svg_mobject.py

Available codes defined in manimlib.mobject.svg.svg_mobject.py

image

Two classes, SVGMobject(VMobject), and VMobjectFromSVGPathstring(VMobject).

Import

import itertools as it
import re
import string
import warnings

from xml.dom import minidom

from manimlib.constants import *
from manimlib.mobject.geometry import Circle
from manimlib.mobject.geometry import Rectangle
from manimlib.mobject.geometry import RoundedRectangle
from manimlib.mobject.types.vectorized_mobject import VGroup
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.utils.color import *
from manimlib.utils.config_ops import digest_config
from manimlib.utils.config_ops import digest_locals

Global Function

  • def string_to_numbers(num_string)

Class SVGMobject(VMobject)

class manimlib.mobject.svg.svg_mobject.SVGMobject(VMobject)version 19Dec2019

Configuration

    CONFIG = {
        "should_center": True,
        "height": 2,
        "width": None,
        # Must be filled in in a subclass, or when called
        "file_name": None,
        "unpack_groups": True,  # if False, creates a hierarchy of VGroups
        "stroke_width": DEFAULT_STROKE_WIDTH,
        "fill_opacity": 1.0,
        # "fill_color" : LIGHT_GREY,
    }

Functions

  • def __init__(self, file_name=None, **kwargs)
  • def ensure_valid_file(self)
  • def generate_points(self)
  • def get_mobjects_from(self, element)
  • def g_to_mobjects(self, g_element)
  • def path_string_to_mobject(self, path_string)
  • def use_to_mobjects(self, use_element)
  • def attribute_to_float(self, attr)
  • def polygon_to_mobject(self, polygon_element)
  • # <circle class="st1" cx="143.8" cy="268" r="22.6"/>
  • def circle_to_mobject(self, circle_element)
  • def ellipse_to_mobject(self, circle_element)
  • def rect_to_mobject(self, rect_element)
  • def handle_transforms(self, element, mobject)
  • def flatten(self, input_list)
  • def get_all_childNodes_have_id(self, element)
  • def update_ref_to_element(self, defs)
  • def move_into_position(self)

Class VMobjectFromSVGPathstring(VMobject)

class manimlib.mobject.svg.svg_mobject.VMobjectFromSVGPathstring(VMobject)version 19Dec2019

Functions

  • def __init__(self, path_string, **kwargs)
  • def get_path_commands(self)
  • def generate_points(self)
  • def handle_command(self, command, coord_string)
  • def string_to_points(self, coord_string)
  • def get_original_path_string(self)

Source and Reference

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

©sideway

ID: 200602402 Last Updated: 24/6/2020 Revision: 0

IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 337

Reference 67

Computer

Hardware 149

Software

Application 198

Digitization 105

Numeric 19

Programming

Web 283

Unicode 494

HTML 65

CSS 58

ASP.NET 66

OS 389

DeskTop 7

Python 17

Knowledge

Mathematics

Formulas 8

Algebra 25

Number Theory 206

Trigonometry 18

Geometry 18

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

Physics

Electric 27

Biology 1

Geography 1


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