Sideway
output.to from Sideway
Draft for Information Only

Content

Manim Drawings
 Codes in Drawings.py
  Import
  Class class Lightbulb(SVGMobject)
   Configuration
  Class BitcoinLogo(SVGMobject)
   Configuration
   Functions
  Class Guitar(SVGMobject)
   Configuration
  Class SunGlasses(SVGMobject)
   Configuration
   Functions
  Class Speedometer(VMobject)
   Configuration
   Functions
  Class AoPSLogo(SVGMobject)
   Configuration
   Functions
  Class PartyHat(SVGMobject)
   Configuration
   Constants
   Functions
  Class Laptop(VGroup)
   Configuration
   Functions
  Class PatreonLogo(SVGMobject)
   Configuration
   Functions
  Class VideoIcon(SVGMobject)
   Configuration
   Functions
  Class VideoSeries(VGroup)
   Configuration
   Functions
  Class Headphones(SVGMobject)
   Configuration
   Functions
  Class Clock(VGroup)
   Configuration
   Functions
  Class ClockPassesTime(Animation)
   Configuration
   Functions
  Class Bubble(SVGMobject)
   Configuration
   Functions
  Class SpeechBubble(Bubble)
   Configuration
  Class DoubleSpeechBubble(Bubble)
   Configuration
  Class ThoughtBubble(Bubble)
   Configuration
   Functions
  Class Car(SVGMobject)
   Configuration
   Functions
  Class VectorizedEarth(SVGMobject)
   Configuration
   Functions
  Class Logo(VMobject)
   Configuration
   Functions
  Class DeckOfCards(VGroup)
   Functions
  Class PlayingCard(VGroup)
   Configuration
   Functions
  Class SuitSymbol(SVGMobject)
   Configuration
   Functions
 Source and Reference

Manim Drawings

The drawings VMobject object in Manim is defined in drawings.py.

Codes in Drawings.py

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

image

Import

import itertools as it
import string

from manimlib.animation.animation import Animation
from manimlib.animation.rotation import Rotating
from manimlib.constants import *
from manimlib.mobject.geometry import AnnularSector
from manimlib.mobject.geometry import Arc
from manimlib.mobject.geometry import Circle
from manimlib.mobject.geometry import Line
from manimlib.mobject.geometry import Polygon
from manimlib.mobject.geometry import Rectangle
from manimlib.mobject.geometry import Square
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.svg.svg_mobject import SVGMobject
from manimlib.mobject.svg.tex_mobject import TexMobject
from manimlib.mobject.svg.tex_mobject import TextMobject
from manimlib.mobject.three_dimensions import Cube
from manimlib.mobject.types.vectorized_mobject import VGroup
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.mobject.types.vectorized_mobject import VectorizedPoint
from manimlib.utils.bezier import interpolate
from manimlib.utils.config_ops import digest_config
from manimlib.utils.rate_functions import linear
from manimlib.utils.space_ops import angle_of_vector
from manimlib.utils.space_ops import complex_to_R3
from manimlib.utils.space_ops import rotate_vector

Class class Lightbulb(SVGMobject)

class manimlib.mobject.svg.drawings.class Lightbulb(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "lightbulb",
        "height": 1,
        "stroke_color": YELLOW,
        "stroke_width": 3,
        "fill_color": YELLOW,
        "fill_opacity": 0,
    }

Class BitcoinLogo(SVGMobject)

class manimlib.mobject.svg.drawings.BitcoinLogo(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "Bitcoin_logo",
        "height": 1,
        "fill_color": "#f7931a",
        "inner_color": WHITE,
        "fill_opacity": 1,
        "stroke_width": 0,
    }

Functions

  • def __init__(self, **kwargs)

Class Guitar(SVGMobject)

class manimlib.mobject.svg.drawings.Guitar(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "guitar",
        "height": 2.5,
        "fill_color": DARK_GREY,
        "fill_opacity": 1,
        "stroke_color": WHITE,
        "stroke_width": 0.5,
    }

Class SunGlasses(SVGMobject)

class manimlib.mobject.svg.drawings.SunGlasses(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "sunglasses",
        "glasses_width_to_eyes_width": 1.1,
    }

Functions

  • def __init__(self, pi_creature, **kwargs)

Class Speedometer(VMobject)

class manimlib.mobject.svg.drawings.Speedometer(VMobject)version 19Dec2019

Configuration

    CONFIG = {
        "arc_angle": 4 * np.pi / 3,
        "num_ticks": 8,
        "tick_length": 0.2,
        "needle_width": 0.1,
        "needle_height": 0.8,
        "needle_color": YELLOW,
    }

Functions

  • def generate_points(self)
  • def get_center(self)
  • def get_needle_tip(self)
  • def get_needle_angle(self)
  • def rotate_needle(self, angle)
  • def move_needle_to_velocity(self, velocity)

Class AoPSLogo(SVGMobject)

class manimlib.mobject.svg.drawings.AoPSLogo(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "aops_logo",
        "height": 1.5,
    }

Functions

  • def __init__(self, **kwargs)

Class PartyHat(SVGMobject)

class manimlib.mobject.svg.drawings.PartyHat(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "party_hat",
        "height": 1.5,
        "pi_creature": None,
        "stroke_width": 0,
        "fill_opacity": 1,
        "frills_colors": [MAROON_B, PURPLE],
        "cone_color": GREEN,
        "dots_colors": [YELLOW],
    }

Constants

    NUM_FRILLS = 7
    NUM_DOTS = 6

Functions

  • def __init__(self, **kwargs)

Class Laptop(VGroup)

class manimlib.mobject.svg.drawings.Laptop(VGroup)version 19Dec2019

Configuration

    CONFIG = {
        "width": 3,
        "body_dimensions": [4, 3, 0.05],
        "screen_thickness": 0.01,
        "keyboard_width_to_body_width": 0.9,
        "keyboard_height_to_body_height": 0.5,
        "screen_width_to_screen_plate_width": 0.9,
        "key_color_kwargs": {
            "stroke_width": 0,
            "fill_color": BLACK,
            "fill_opacity": 1,
        },
        "fill_opacity": 1,
        "stroke_width": 0,
        "body_color": LIGHT_GREY,
        "shaded_body_color": GREY,
        "open_angle": np.pi / 4,
    }

Functions

  • def __init__(self, **kwargs)

Class PatreonLogo(SVGMobject)

class manimlib.mobject.svg.drawings.PatreonLogo(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "patreon_logo",
        "fill_color": "#F96854",
        # "fill_color" : WHITE,
        "fill_opacity": 1,
        "stroke_width": 0,
        "width": 4,
    }

Functions

  • def __init__(self, **kwargs)

Class VideoIcon(SVGMobject)

class manimlib.mobject.svg.drawings.VideoIcon(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "video_icon",
        "width": FRAME_WIDTH / 12.,
    }

Functions

  • def __init__(self, **kwargs)

Class VideoSeries(VGroup)

class manimlib.mobject.svg.drawings.VideoSeries(VGroup)version 19Dec2019

Configuration

    CONFIG = {
        "num_videos": 11,
        "gradient_colors": [BLUE_B, BLUE_D],
    }

Functions

  • def __init__(self, **kwargs)

Class Headphones(SVGMobject)

class manimlib.mobject.svg.drawings.Headphones(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "headphones",
        "height": 2,
        "y_stretch_factor": 0.5,
        "color": GREY,
    }

Functions

  • def __init__(self, pi_creature=None, **kwargs)

Class Clock(VGroup)

class manimlib.mobject.svg.drawings.Clock(VGroup)version 19Dec2019

Configuration

    CONFIG = {}

Functions

  • def __init__(self, **kwargs)

Class ClockPassesTime(Animation)

class manimlib.mobject.svg.drawings.ClockPassesTime(Animation)version 19Dec2019

Configuration

    CONFIG = {
        "run_time": 5,
        "hours_passed": 12,
        "rate_func": linear,
    }

Functions

  • def __init__(self, clock, **kwargs)
  • def interpolate_mobject(self, alpha)

Class Bubble(SVGMobject)

class manimlib.mobject.svg.drawings.Bubble(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "direction": LEFT,
        "center_point": ORIGIN,
        "content_scale_factor": 0.75,
        "height": 5,
        "width": 8,
        "bubble_center_adjustment_factor": 1. / 8,
        "file_name": None,
        "fill_color": BLACK,
        "fill_opacity": 0.8,
        "stroke_color": WHITE,
        "stroke_width": 3,
    }

Functions

  • def __init__(self, **kwargs)
  • def get_tip(self)
  • def get_bubble_center(self)
  • def move_tip_to(self, point)
  • def flip(self, axis=UP)
  • def pin_to(self, mobject)
  • def position_mobject_inside(self, mobject)
  • def add_content(self, mobject)
  • def write(self, *text)
  • def resize_to_content(self)
  • def clear(self)

Class SpeechBubble(Bubble)

class manimlib.mobject.svg.drawings.SpeechBubble(Bubble)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "Bubbles_speech.svg",
        "height": 4
    }

Class DoubleSpeechBubble(Bubble)

class manimlib.mobject.svg.drawings.DoubleSpeechBubble(Bubble)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "Bubbles_double_speech.svg",
        "height": 4
    }

Class ThoughtBubble(Bubble)

class manimlib.mobject.svg.drawings.ThoughtBubble(Bubble)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "Bubbles_thought.svg",
    }

Functions

  • def __init__(self, **kwargs)
  • def make_green_screen(self)

Class Car(SVGMobject)

class manimlib.mobject.svg.drawings.Car(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "Car",
        "height": 1,
        "color": LIGHT_GREY,
        "light_colors": [BLACK, BLACK],
    }

Functions

  • def __init__(self, **kwargs)
  • def move_to(self, point_or_mobject)
  • def get_front_line(self)
  • def add_treds_to_tires(self)
  • def get_tires(self)
  • def get_lights(self)
  • def get_front_light(self)
  • def get_rear_light(self)

Class VectorizedEarth(SVGMobject)

class manimlib.mobject.svg.drawings.VectorizedEarth(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "file_name": "earth",
        "height": 1.5,
        "fill_color": BLACK,
    }

Functions

  • def __init__(self, **kwargs)

Class Logo(VMobject)

class manimlib.mobject.svg.drawings.Logo(VMobject)version 19Dec2019

Configuration

    CONFIG = {
        "pupil_radius": 1.0,
        "outer_radius": 2.0,
        "iris_background_blue": "#74C0E3",
        "iris_background_brown": "#8C6239",
        "blue_spike_colors": [
            "#528EA3",
            "#3E6576",
            "#224C5B",
            BLACK,
        ],
        "brown_spike_colors": [
            "#754C24",
            "#603813",
            "#42210b",
            BLACK,
        ],
        "n_spike_layers": 4,
        "n_spikes": 28,
        "spike_angle": TAU / 28,
    }

Functions

  • def __init__(self, **kwargs)
  • def add_iris_back(self)
  • def add_spikes(self)
  • def add_pupil(self)
  • def cut_pupil(self)
  • def get_blue_part_and_brown_part(self)

Class DeckOfCards(VGroup)

class manimlib.mobject.svg.drawings.DeckOfCards(VGroup)version 19Dec2019

Functions

  • def __init__(self, **kwargs)

Class PlayingCard(VGroup)

class manimlib.mobject.svg.drawings.PlayingCard(VGroup)version 19Dec2019

Configuration

    CONFIG = {
        "value": None,
        "suit": None,
        "key": None,  # String like "8H" or "KS"
        "height": 2,
        "height_to_width": 3.5 / 2.5,
        "card_height_to_symbol_height": 7,
        "card_width_to_corner_num_width": 10,
        "card_height_to_corner_num_height": 10,
        "color": LIGHT_GREY,
        "turned_over": False,
        "possible_suits": ["hearts", "diamonds", "spades", "clubs"],
        "possible_values": list(map(str, list(range(2, 11)))) + ["J", "Q", "K", "A"],
    }

Functions

  • def __init__(self, key=None, **kwargs)
  • def generate_points(self)
  • def get_value(self)
  • def get_symbol(self)
  • def get_design(self, value, symbol)
  • def get_ace_design(self, symbol)
  • def get_number_design(self, value, symbol)
  • def get_face_card_design(self, value, symbol)
  • def get_corner_numbers(self, value, symbol)

Class SuitSymbol(SVGMobject)

class manimlib.mobject.svg.drawings.SuitSymbol(SVGMobject)version 19Dec2019

Configuration

    CONFIG = {
        "height": 0.5,
        "fill_opacity": 1,
        "stroke_width": 0,
        "red": "#D02028",
        "black": BLACK,
    }

Functions

  • def __init__(self, suit_name, **kwargs)

Source and Reference

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

©sideway

ID: 200603002 Last Updated: 6/30/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 339

Reference 79

Computer

Hardware 249

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 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

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