Sideway
output.to from Sideway
Draft for Information Only

Content

Manim Camera.py
 Codes in Camera.py
  Import
  Class Camera(object)
   Configuration
   Functions
  Class BackgroundColoredVMobjectDisplayer(object)
   Functions
 Source and Reference

Manim Camera.py

Codes in Camera.py

Available codes defined in manimlib.camera.camera.py

image

Import

from functools import reduce
import itertools as it
import operator as op
import time
import copy

from PIL import Image
from scipy.spatial.distance import pdist
import cairo
import numpy as np

from manimlib.constants import *
from manimlib.mobject.types.image_mobject import AbstractImageMobject
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.types.point_cloud_mobject import PMobject
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.utils.color import color_to_int_rgba
from manimlib.utils.config_ops import digest_config
from manimlib.utils.images import get_full_raster_image_path
from manimlib.utils.iterables import batch_by_property
from manimlib.utils.iterables import list_difference_update
from manimlib.utils.iterables import remove_list_redundancies
from manimlib.utils.simple_functions import fdiv
from manimlib.utils.space_ops import angle_of_vector
from manimlib.utils.space_ops import get_norm

Class Camera(object)

class manimlib.camera.camera.Camera(object)version 19Dec2019

Configuration

    CONFIG = {
        "background_image": None,
        "pixel_height": DEFAULT_PIXEL_HEIGHT,
        "pixel_width": DEFAULT_PIXEL_WIDTH,
        "frame_rate": DEFAULT_FRAME_RATE,
        # Note: frame height and width will be resized to match
        # the pixel aspect ratio
        "frame_height": FRAME_HEIGHT,
        "frame_width": FRAME_WIDTH,
        "frame_center": ORIGIN,
        "background_color": BLACK,
        "background_opacity": 1,
        # Points in vectorized mobjects with norm greater
        # than this value will be rescaled.
        "max_allowable_norm": FRAME_WIDTH,
        "image_mode": "RGBA",
        "n_channels": 4,
        "pixel_array_dtype": 'uint8',
        # z_buff_func is only used if the flag above is set to True.
        # round z coordinate to nearest hundredth when comparring
        "z_buff_func": lambda m: np.round(m.get_center()[2], 2),
        "cairo_line_width_multiple": 0.01,
    }

Functions

  • def __init__(self, background=None, **kwargs)
  • def __deepcopy__(self, memo)
  • def reset_pixel_shape(self, new_height, new_width)
  • def get_pixel_height(self)
  • def get_pixel_width(self)
  • def get_frame_height(self)
  • def get_frame_width(self)
  • def get_frame_center(self)
  • def set_frame_height(self, frame_height)
  • def set_frame_width(self, frame_width)
  • def set_frame_center(self, frame_center)
  • def resize_frame_shape(self, fixed_dimension=0)
  • def init_background(self)
  • def get_image(self, pixel_array=None)
  • def get_pixel_array(self)
  • def convert_pixel_array(self, pixel_array, convert_from_floats=False)
  • def set_pixel_array(self, pixel_array, convert_from_floats=False)
  • def set_background(self, pixel_array, convert_from_floats=False)
  • def make_background_from_func(self, coords_to_colors_func)
  • def set_background_from_func(self, coords_to_colors_func)
  • def reset(self)
  • def extract_mobject_family_members( self, mobjects, only_those_with_points=False)
  • def get_mobjects_to_display( self, mobjects, include_submobjects=True, excluded_mobjects=None)
  • def is_in_frame(self, mobject)
  • def capture_mobject(self, mobject, **kwargs)
  • def capture_mobjects(self, mobjects, **kwargs)
    • def get_mobject_type(mobject)
  • def get_cached_cairo_context(self, pixel_array)
  • def cache_cairo_context(self, pixel_array, ctx)
  • def get_cairo_context(self, pixel_array)
  • def display_multiple_vectorized_mobjects(self, vmobjects, pixel_array)
  • def display_multiple_non_background_colored_vmobjects(self, vmobjects, pixel_array)
  • def display_vectorized(self, vmobject, ctx)
  • def set_cairo_context_path(self, ctx, vmobject)
  • def set_cairo_context_color(self, ctx, rgbas, vmobject)
  • def apply_fill(self, ctx, vmobject)
  • def apply_stroke(self, ctx, vmobject, background=False)
  • def get_stroke_rgbas(self, vmobject, background=False)
  • def get_fill_rgbas(self, vmobject)
  • def get_background_colored_vmobject_displayer(self)
  • def display_multiple_background_colored_vmobject(self, cvmobjects, pixel_array)
  • def display_multiple_point_cloud_mobjects(self, pmobjects, pixel_array)
  • def display_point_cloud(self, pmobject, points, rgbas, thickness, pixel_array)
  • def display_multiple_image_mobjects(self, image_mobjects, pixel_array)
  • def display_image_mobject(self, image_mobject, pixel_array)
  • def overlay_rgba_array(self, pixel_array, new_array)
  • def overlay_PIL_image(self, pixel_array, image)
  • def adjust_out_of_range_points(self, points)
  • def transform_points_pre_display(self, mobject, points)
  • def points_to_pixel_coords(self, mobject, points)
  • def on_screen_pixels(self, pixel_coords)
  • def adjusted_thickness(self, thickness)
  • def get_thickening_nudges(self, thickness)
  • def thickened_coordinates(self, pixel_coords, thickness)
  • def get_coords_of_all_pixels(self)

Class BackgroundColoredVMobjectDisplayer(object)

class manimlib.camera.camera.BackgroundColoredVMobjectDisplayer(object)version 19Dec2019

Functions

  • def __init__(self, camera)
  • def reset_pixel_array(self)
  • def resize_background_array( self, background_array, new_width, new_height, mode="RGBA" )
  • def resize_background_array_to_match(self, background_array, pixel_array)
  • def get_background_array(self, file_name)
  • def display(self, *cvmobjects)

Source and Reference

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

©sideway

ID: 200802202 Last Updated: 22/8/2020 Revision: 0

IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 337

Reference 67

Computer

Hardware 151

Software

Application 198

Digitization 25

Latex 9

Manim 121

Numeric 19

Programming

Web 283

Unicode 494

HTML 65

CSS 58

ASP.NET 174

OS 389

DeskTop 7

Python 19

Knowledge

Mathematics

Formulas 8

Algebra 25

Number Theory 206

Trigonometry 18

Geometry 21

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