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

Content

Geometry Polygon
โ€ƒClass Polygon(VMobject)
โ€ƒโ€ƒExample
โ€ƒClass Class RegularPolygon(Polygon)
โ€ƒโ€ƒExample
โ€ƒClass Triangle(RegularPolygon)
โ€ƒโ€ƒExample
โ€ƒClass ArrowTip(Triangle)
โ€ƒโ€ƒExample
โ€ƒClass Rectangle(Polygon)
โ€ƒโ€ƒExample
โ€ƒClass Square(Rectangle)
โ€ƒโ€ƒExample
โ€ƒClass RoundedRectangle(Rectangle)
โ€ƒโ€ƒExample

Geometry Polygon

The defined geometry VMobject related to polygon in geometry.py
  • Class Polygon(VMobject)
  • Class RegularPolygon(Polygon)
  • Class Triangle(RegularPolygon)
  • Class ArrowTip(Triangle)
  • Class Rectangle(Polygon)
  • Class Square(Rectangle)
  • Class RoundedRectangle(Rectangle)

Class Polygon(VMobject)

Polygon is a general purpose closed continuous line constructor for a 3D point array. Polygon can be used to generate polygon of any type from a given point set. Polygon can also be used as a dummy polygon constructor for other defined polygon. Crossed polygon is also accepted.

Example

Code
# folder/file: tut/manim_mobject_polygon_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import Polygon
from manimlib.animation.creation import ShowCreation

class manim_mobject_polygon_001a(Scene): 
   def construct(self):
      poly = Polygon((0,0,0),(1,1,0),(2,-1.2,0),(3,0,0),(2,-1,0),(1,-1,0),stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
      self.play(ShowCreation(poly),run_time=2)
      self.play(ShowCreation(Polygon((-6.5,3,0),(-5,4,0),(-2,-1.2,0))),run_time=2)
      self.play(ShowCreation(Polygon((-5.5,3,0),(-4,4,0),stroke_width=50)),run_time=2)
      self.play(ShowCreation(Polygon((5.5,3,0),stroke_width=50)),run_time=2)        
Output
image

Class Class RegularPolygon(Polygon)

RegularPolygon is used to generate regular polygon for a given number of sides

Example

Code
# folder/file: tut/manim_mobject_regularpolygon_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import RegularPolygon
from manimlib.animation.creation import ShowCreation

class manim_mobject_regularpolygon_001a(Scene): 
   def construct(self):
      poly = RegularPolygon(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
      self.play(ShowCreation(poly.scale(2)),run_time=2)
      self.play(ShowCreation(RegularPolygon(1)),run_time=2)
      self.play(ShowCreation(RegularPolygon(2)),run_time=2)
      self.play(ShowCreation(RegularPolygon(4).scale(1.5)),run_time=2)               
Output
image

Class Triangle(RegularPolygon)

Triangle is used to generate regular triangular shape.

Example

Code
# folder/file: tut/manim_mobject_triangle_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import Triangle
from manimlib.animation.creation import ShowCreation

class manim_mobject_triangle_001a(Scene): 
    def construct(self):
        poly = Triangle(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
        self.play(ShowCreation(poly),run_time=2)
        self.play(ShowCreation(Triangle().scale(2)),run_time=2)
        self.play(ShowCreation(Triangle().scale(0.5)),run_time=2)
        self.play(ShowCreation(Triangle(stroke_width=10).scale_about_point(2,(0,0,0))),run_time=2)
Output
image

Class ArrowTip(Triangle)

ArrowTip is used to generate triangular arrow tip.

Example

Code
# folder/file: tut/manim_mobject_arrowtip_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import ArrowTip
from manimlib.animation.creation import ShowCreation

class manim_mobject_arrowtip_001a(Scene): 
    def construct(self):
        poly = ArrowTip(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
        self.play(ShowCreation(ArrowTip(stroke_width=10).scale_about_point(2,(0,0,0))),run_time=2)
        self.play(ShowCreation(poly),run_time=2)
        self.play(ShowCreation(ArrowTip().shift((2,0,0)).scale(2)),run_time=2)
        self.play(ShowCreation(ArrowTip().shift((0,0.5,0))),run_time=2)          
Output
image

Class Rectangle(Polygon)

Rectangle is used to generate rectangular shape for given height and width.

Example

Code
# folder/file: tut/manim_mobject_rectangle_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import Rectangle
from manimlib.animation.creation import ShowCreation

class manim_mobject_rectangle_001a(Scene): 
    def construct(self):
        poly = Rectangle(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
        self.play(ShowCreation(poly),run_time=2)
        self.play(ShowCreation(Rectangle(width=3.5,height=2,color="#000000")),run_time=2)
        self.play(ShowCreation(Rectangle(width=3,height=1,color="#008800")),run_time=2)
        self.play(ShowCreation(Rectangle().scale(1.5)),run_time=2)               
Output
image

Class Square(Rectangle)

Square is used to generate a square shape for given side_length.

Example

Code
# folder/file: tut/manim_mobject_square_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import Square
from manimlib.animation.creation import ShowCreation

class manim_mobject_square_001a(Scene):
    def construct(self):
        poly = Square(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
        self.play(ShowCreation(poly),run_time=2)
        self.play(ShowCreation(Square(side_length=1,color="#000000")),run_time=2)
        self.play(ShowCreation(Square(side_length=5,color="#008800")),run_time=2)
        self.play(ShowCreation(Square().scale(1.5)),run_time=2)
Output
image

Class RoundedRectangle(Rectangle)

RoundedRectangle is used to generate a rounded rectangular shape with corner_radius in additional to width and height.

Example

Code
# folder/file: tut/manim_mobject_roundedrectangle_001a.py

from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import RoundedRectangle
from manimlib.animation.creation import ShowCreation

class manim_mobject_roundedrectangle_001a(Scene):
    def construct(self):
        poly = RoundedRectangle(stroke_width=15,color="#88FF00",fill_color="#FFFF00",fill_opacity=1)
        self.play(ShowCreation(poly),run_time=2)
        self.play(ShowCreation(RoundedRectangle(width=3.5,height=2,corner_radius=1,color="#000000")),run_time=2)
        self.play(ShowCreation(RoundedRectangle(width=3,height=0.7,color="#008800")),run_time=1.5)
        self.play(ShowCreation(RoundedRectangle().scale(1.5)),run_time=2)
Output
image

ยฉsideway

ID: 200402502 Last Updated: 4/25/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 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