〔manim教程〕第四講 插入SVG、圖片與文字


?
00:24
?絕對路徑
manim 文件夾
素材目錄assets
- raster_images
- svg_images
- sounds
?
01:27
?mob = SVGMobject("coin.svg",color=BLUE,stroke_width=2.56) self.paly(Uncreate(mob))
可用元素

?
02:36
?img = ImageMobject( "up.png",heigtht=2,invert=False )
?
03:37
?text = TextMobject( "Text文字", color=BLUE, background_stroke_color=RED ) self.play(Uncreate(text)) text2=TextMobject("\\LaTeX\\\\換行") text3=TextMobject(r"\LaTeX") text4=TextMobject("ab","cde")

tex = TexMobject("\\sum^n_{i=1}i^3=?").scale(2) debugTeX(self,tex[0])
以下寫法等價
TextMobject("文字$公式$") TexMobject("\\text{文字}公式")
?
07:11
?text = Text( "a bbcde\n\tfghi", color = BLACK, font = "Consolas", t2c={"bcd":BLUE} ).scale(2) self.play(Write(text)) debugTex(self,text)
標簽: