〔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)