Sideway
output.to from Sideway
Draft for Information Only

Content

Numeric Form
 Class DecimalNumber(VMobject)
  Example
   Code
   Output
 Class Integer(DecimalNumber)
  Example
   Code
   Output

Numeric Form

The defined numeric form VMobject in numbers.py
  • Class DecimalNumber(VMobject)
  • Class Integer(DecimalNumber)

Class DecimalNumber(VMobject)

DecimalNumber is used to render the numeric value of a specified VMobject with given parameters, num_decimal_places, include_sign, group_with_commas, digit_to_digit_buff, show_ellipsis, unit, include_background_rectangle, and edge_to_fix.

Example

Code

# folder/file: tut/manim_mobject_decimalnumber_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.numbers import DecimalNumber

class manim_mobject_decimalnumber_001a(Scene): 
    def construct(self):
        num=DecimalNumber(1234555)
        self.add(num.move_to([0,1,0]))
        self.wait(2)
        self.add(DecimalNumber().move_to([1,2,0]))
        self.wait(2)
        self.add(DecimalNumber(1234555.2222222222,num_decimal_places=3,include_sign=True,group_with_commas=False,show_ellipsis=True,unit="mm",digit_to_digit_buff=0.5,include_background_rectangle=False).move_to([0,0.8,0]).set_color("#FF3300"))
        self.wait(2)
        self.add(DecimalNumber(edge_to_fix=([1,0,0])).set_value(num.get_value()))
        self.wait(2)

Output

image

Class Integer(DecimalNumber)

Integer is used to render the numeric value of a specified VMobject with given parameters, include_sign, group_with_commas, digit_to_digit_buff, show_ellipsis, unit, include_background_rectangle, and edge_to_fix where num_decimal_places is equal to zero by default,.

Example

Code

# folder/file: tut/manim_mobject_integer_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.numbers import Integer

class manim_mobject_integer_001a(Scene): 
    def construct(self):
        num=Integer(1234555)
        self.add(num.move_to([0,1,0]))
        self.wait(2)
        self.add(Integer().move_to([1,2,0]))
        self.wait(2)
        self.add(Integer(1234555.2222222222,num_decimal_places=3,include_sign=True,group_with_commas=False,show_ellipsis=True,unit="mm",digit_to_digit_buff=0.5,include_background_rectangle=True).move_to([0,0.8,0]))
        self.wait(2)
        self.add(Integer(edge_to_fix=([1,0,0])).set_value(num.get_value()))
        self.wait(2)

Output

image

©sideway

ID: 200302702 Last Updated: 3/27/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 339new

Travel 7new

Reference 79

Computer

Hardware 251

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 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

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