文章目录前言准备工具硬件自己准备软件我会在文末提供链接安装1. 安装Termux2. 安装proot-distro3. 安装Ubuntu4. 登录Ubuntu5. 安装必要的包6. 安装LaTeX \LaTeXLATEXTexlive-fullTinyTex7. 中文支持测试结尾下载链接本文由Jzwalliser原创发布在CSDN平台上遵循CC 4.0 BY-NC-SA协议。因此若需转载/引用本文请注明作者并附原文链接不得用于商业用途。违者必究谢谢配合。个人主页blog.csdn.net/jzwalliser前言最近突发奇想能不能在安卓手机上跑 Manim毕竟出门在外手边只有手机的时候要是能随手写个动画演示岂不是美滋滋说干就干开整准备工具硬件自己准备1. 一台手机至少安卓5以上安卓7以上会更好软件我会在文末提供链接2. Termuxapk3. Ubuntu 容器镜像.tar.xz4. 几个测试文件zip安装1. 安装Termux首先需要安装Termux。因此上Github把termux的安装包下载下来自行寻找适合的版本。如果下载不了也可以到文章末尾找链接。2. 安装proot-distro在Termux环境中直接安装manim很麻烦因为缺少了各种依赖所以很多东西编译不通过不是我懒而是真折腾不出来啊。所以这里我“曲线救国”先安装Ubuntu容器再在Ubuntu中安装manim当然如果你捣腾出来termux下直装manim的方法也欢迎分享。所以执行pkginstallpython proot pipinstallproot-distro如果速度很慢也可以先换国内镜像再安装。执行termux-change-repo请使用上、下、空格、回车键操作。3. 安装Ubuntu下载完proot-distro之后安装Ubuntu。运行proot-distroinstallubuntu如果网络顺利Ubuntu 会直接安装完成那恭喜你可以直接跳到下一节。如果无法下载相应的ubuntu包则请手动下载。然后把ubuntu拷贝到手机内接着执行termux-setup-storage这会打开文件授权的对话框。打开文件访问的开关即可接着返回到termux运行proot-distroinstall/storage/emulated/0/.../ubuntu-noble-aarch64-pd-v4.18.0.tar.xz其中/storage/emulated/0/.../ubuntu-noble-aarch64-pd-v4.18.0.tar.xz就是Ubuntu包的路径请替换为你的文件安装好后可通过以下命令查看已安装的内容。proot-distro list安装完后我的手机上显示的是ubuntu-noble-aarch64-pd-v4.18.0。实在是很长如果你也嫌长的话可以重命名proot-distrorenameubuntu-noble-aarch64-pd-v4.18.0 ubuntu4. 登录Ubuntu登录很简单proot-distro login ubuntu如果出错显示Error: container ubuntu is not installed.多半是因为容器名不一致。此时你有两个选择1. 返回上一步把容器重命名为ubuntu再登录2. 运行proot-distro login ubuntu-noble-aarch64-pd-v4.18.0也可以登陆反正去查proot-distro list5. 安装必要的包登录ubuntu后就可以开始安装必要的包了。执行aptupdateaptinstalllibswresample-dev libavutil-dev libpango1.0-dev fonts-noto-cjk ffmpeg libpangocairo-1.0-0 libavformat-dev pkg-config gir1.2-pango-1.0 libcairo2-dev libswscale-dev libfontconfig1-dev libavdevice-dev build-essential libfreetype6-dev python3-dev libavcodec-dev libavfilter-dev python3-pip libglib2.0-dev必要的包安装完了现在开始安装manim。国内网络环境下建议使用国内 PyPI 镜像例如清华、阿里云等。这里以腾讯云为例pipinstallmanim-ihttps://mirrors.cloud.tencent.com/pypi/simple/ --break-system-packages解释一下--break-system-packagesDebian/Ubuntu 新版本 pip 默认禁止直接向系统 Python 安装pip包不过可以--break-system-packages绕过这个机制。但是这会污染系统 Python 环境所以如果计划在容器中做更多开发强烈建议使用python -m venv。当然如果整个容器内只运行manim的话问题也不大。一般来说到这一步就结束了可以正常使用manim了。6. 安装LaTeX \LaTeXLATEX这些操作是可选的。如果你有数学公式渲染的需求就继续看下去吧若无数学公式渲染需求到这里就可以结束安装啦Texlive-full如果手机空间足够大例如你是土豪不想倒腾想省心那么安装texlive-full即可。aptinstalltexlive-full这会下载8GB的内容然后一切都会自动配置好不需要人工干预。TinyTex如果你觉得8GB太太太大了我就是这么觉得的显然我不是土豪那么装TinyTex。不过会比较麻烦。执行aptinstallwgetwget-qO-https://tinytex.yihui.org/install-bin-unix.sh|sh自此TinyTex安装完毕。接着把TinyTex的LaTeX编译器加到环境变量中echoexportPATH$HOME/.TinyTeX/bin/aarch64-linux:$PATH~/.bashrc注意该路径适用于 ARM64aarch64设备但如果你的设备不是 aarch64则可通过uname -m确认架构并相应调整路径。重新登录logoutproot-distro login ubuntu检查whichlatex如果有输出那么配置正确。接着安装必要的包tlmgrinstallstandalone dvisvgm preview babel babel-english mktexlsrLaTeX \LaTeXLATEX就此安装完毕7. 中文支持如果需要支持中文那么还需要修改文件。推荐这样就一劳永逸了安装nano熟悉vim的也可以使用vimaptinstallnano接着用nano打开文件/usr/local/lib/python3.12/dist-packages/manim/utils/tex.pynano/usr/local/lib/python3.12/dist-packages/manim/utils/tex.py此时你会看到文件长这个样子Utilities for processing LaTeX templates.from__future__importannotations __all__[TexTemplate,]importcopyimportreimportwarningsfromdataclassesimportdataclass,fieldfrompathlibimportPathfromtypingimportTYPE_CHECKING,AnyifTYPE_CHECKING:fromtypingimportSelffrommanim.typingimportStrPath _DEFAULT_PREAMBLEr\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb}_BEGIN_DOCUMENTr\begin{document}_END_DOCUMENTr\end{document}#后面省略翻到_DEFAULT_PREAMBLE修改成这样#上面省略_DEFAULT_PREAMBLEr\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ctex}#下面省略然后CtrlO保存再Enter确认最后CtrlX退出编辑。接着如果你安装的是tinytex安装了texlive-full的忽略这一步还要执行tlmgrinstallctex测试安装完成后可以写一个Manim场景保存到main.pyfrommanimimport*importrandomimportnumpyclassCongratulations(Scene):defconstruct(self):bannerManimBanner().scale(0.5)congratulationText(Congratulations!\nYour Manim installation was successful.).next_to(banner,DOWN).scale(0.8)self.play(banner.create(),Write(congratulation))confettiVGroup()colors[RED,BLUE,GREEN,YELLOW,PURPLE,ORANGE,PINK,TEAL]shapes[Rectangle(width0.08,height0.08,fill_opacity0.9,stroke_width0),Circle(radius0.04,fill_opacity0.9,stroke_width0),Triangle(radius0.07,fill_opacity0.9,stroke_width0)]foriinrange(120):pshapes[random.randint(0,len(shapes)-1)].copy().set_color(colorrandom.choice(colors))p.move_to([random.uniform(-6,6),-3.5,0])p.velocitynumpy.array([random.uniform(-0.6,0.6),random.uniform(1.8,2.8),0])p.rotate(random.uniform(0,TAU))p.angular_velocityrandom.uniform(-2,2)p.gravity-0.6p.fade_startFalseconfetti.add(p)defupdate_particles(mob,dt):forpinmob:p.shift(p.velocity*dt*3)p.velocity[1]p.gravity*dt*3p.rotate(p.angular_velocity*dt*3)ifp.velocity[1]0andnotp.fade_start:p.fade_startTrueifp.fade_start:p.set_opacity(max(0,p.get_fill_opacity()-0.01))confetti.add_updater(update_particles)self.add(confetti)self.play(banner.expand())self.wait(3)self.play(FadeOut(banner),FadeOut(congratulation))接着运行以下命令测试manim -ql main.py如果能成功生成视频那么恭喜你的manim可以正常使用了。还可以继续测试LaTeX \LaTeXLATEX代码保存到latex.pyfrommanimimport*classTestLaTeX(Scene):defconstruct(self):eulerMathTex(r\text{Eulers Formula: }e^{i\pi} 1 0)binomialMathTex(r\text{Binomial Theroem: }(ab)^n \sum_{k0}^n{\rm C}_n^ka^{n-k}b^k)taylorMathTex(r\text{Taylor Expansion: }e^x \sum_{n0}^{\infty}\dfrac{x^n}{n!})gravityMathTex(r\text{Gravity: }F G\dfrac{m_1 m_2}{r^2})integralMathTex(r\text{Integral: }\int e^{x} \,{\rm d}x e^{x} C)formulaeVGroup(euler,binomial,taylor,gravity,integral).arrange(DOWN,aligned_edgeLEFT).center()self.play(Write(formulae,lag_ratio0.01))self.wait(1)self.play(FadeOut(formulae))执行manim-qllatex.py如果能成功生成视频那么恭喜你的LaTeX \LaTeXLATEX也可以正常使用了。对于中文代码保存到ctex.pyfrommanimimport*classTestChineseLaTeX(Scene):defconstruct(self):eulerMathTex(r\text{欧拉公式}e^{i\pi} 1 0)binomialMathTex(r\text{二项式定理}(ab)^n \sum_{k0}^n{\rm C}_n^ka^{n-k}b^k)taylorMathTex(r\text{泰勒展开}e^x \sum_{n0}^{\infty}\dfrac{x^n}{n!})gravityMathTex(r\text{万有引力}F G\dfrac{m_1 m_2}{r^2})integralMathTex(r\text{不定积分}\int e^{x} \,{\rm d}x e^{x} C)formulaeVGroup(euler,binomial,taylor,gravity,integral).arrange(DOWN,aligned_edgeLEFT).center()self.play(Write(formulae,lag_ratio0.01))self.wait(1)self.play(FadeOut(formulae))执行manim-qlctex.py如果依然能成功生成视频那么恭喜你的中文LaTeX \LaTeXLATEX环境配置成功。当然如果遇到了什么问题也欢迎在评论区交流。结尾至此你已经拥有了一个手机版的动画引擎啦当然手机CPU肯定没有电脑CPU那么强悍因此渲染视频没有电脑那么快不要要求太高哦码字不易记得点赞收藏哦我们下期再见下载链接Termux 适用于Android 7下载文件termux-appv0.119.0-beta.3apt-android-7-github-debuguniversal.apk百度网盘https://pan.baidu.com/s/1DCpT4Vmb3hv6wFT54BLs0Q?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_universal.apk其他版本可也可前往Github下载Termux 适用于Android 7arm64-v8a下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugarm64-v8a.apk百度网盘https://pan.baidu.com/s/1znolVwBiKcGSg5rGu_jbaw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_arm64-v8a.apk其他版本可也可前往Github下载Termux 适用于Android 7armeabi-v7a下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugarmeabi-v7a.apk百度网盘https://pan.baidu.com/s/1CJgzQcBCZzginUv8khWDZQ?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_armeabi-v7a.apk其他版本可也可前往Github下载Termux 适用于Android 7x86_64下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugx86_64.apk百度网盘https://pan.baidu.com/s/1zlr9BQG3GWKYKyJ4rTwsFw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_x86_64.apk其他版本可也可前往Github下载Termux 适用于Android 5/6下载文件termux-appv0.119.0-beta.3apt-android-5-github-debuguniversal.apk百度网盘https://pan.baidu.com/s/1UN78Kknhx92JyxeY8MiV7w?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_universal.apk其他版本可也可前往Github下载Termux 适用于Android 5/6arm64-v8a下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugarm64-v8a.apk百度网盘https://pan.baidu.com/s/1xb1cUFbxD0SgcrZBnqJB4A?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_arm64-v8a.apk其他版本可也可前往Github下载Termux 适用于Android 5/6armeabi-v7a下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugarmeabi-v7a.apk百度网盘https://pan.baidu.com/s/1nWw5E9Iq0TEjZNdPoksbUw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_armeabi-v7a.apk其他版本可也可前往Github下载Termux 适用于Android 5/6x86_64下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugx86_64.apk百度网盘https://pan.baidu.com/s/1X-5JzUxKXNlIhRQWSk-k-w?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_x86_64.apk其他版本可也可前往Github下载Ubuntu容器适用于arm64-v8a下载文件ubuntu-noble-aarch64-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1CpuLVOsFQ5z_hp-SnFVekA?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-aarch64-pd-v4.18.0.tar.xzUbuntu容器适用于x86_64下载文件ubuntu-noble-x86_64-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1RjbBzGzWxhSgKLCQNy7VZA?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-x86_64-pd-v4.18.0.tar.xzUbuntu容器适用于armeabi-v7a下载文件ubuntu-noble-arm-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1merhqhqcUPGZIR3_8Vv_Ig?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-arm-pd-v4.18.0.tar.xzManim测试文件下载文件Manim 可渲染脚本.zip百度网盘https://pan.baidu.com/s/1g1A1sDSbqW3lvwGf5wGPVA?pwd0000
安卓手机玩转Manim动画制作
文章目录前言准备工具硬件自己准备软件我会在文末提供链接安装1. 安装Termux2. 安装proot-distro3. 安装Ubuntu4. 登录Ubuntu5. 安装必要的包6. 安装LaTeX \LaTeXLATEXTexlive-fullTinyTex7. 中文支持测试结尾下载链接本文由Jzwalliser原创发布在CSDN平台上遵循CC 4.0 BY-NC-SA协议。因此若需转载/引用本文请注明作者并附原文链接不得用于商业用途。违者必究谢谢配合。个人主页blog.csdn.net/jzwalliser前言最近突发奇想能不能在安卓手机上跑 Manim毕竟出门在外手边只有手机的时候要是能随手写个动画演示岂不是美滋滋说干就干开整准备工具硬件自己准备1. 一台手机至少安卓5以上安卓7以上会更好软件我会在文末提供链接2. Termuxapk3. Ubuntu 容器镜像.tar.xz4. 几个测试文件zip安装1. 安装Termux首先需要安装Termux。因此上Github把termux的安装包下载下来自行寻找适合的版本。如果下载不了也可以到文章末尾找链接。2. 安装proot-distro在Termux环境中直接安装manim很麻烦因为缺少了各种依赖所以很多东西编译不通过不是我懒而是真折腾不出来啊。所以这里我“曲线救国”先安装Ubuntu容器再在Ubuntu中安装manim当然如果你捣腾出来termux下直装manim的方法也欢迎分享。所以执行pkginstallpython proot pipinstallproot-distro如果速度很慢也可以先换国内镜像再安装。执行termux-change-repo请使用上、下、空格、回车键操作。3. 安装Ubuntu下载完proot-distro之后安装Ubuntu。运行proot-distroinstallubuntu如果网络顺利Ubuntu 会直接安装完成那恭喜你可以直接跳到下一节。如果无法下载相应的ubuntu包则请手动下载。然后把ubuntu拷贝到手机内接着执行termux-setup-storage这会打开文件授权的对话框。打开文件访问的开关即可接着返回到termux运行proot-distroinstall/storage/emulated/0/.../ubuntu-noble-aarch64-pd-v4.18.0.tar.xz其中/storage/emulated/0/.../ubuntu-noble-aarch64-pd-v4.18.0.tar.xz就是Ubuntu包的路径请替换为你的文件安装好后可通过以下命令查看已安装的内容。proot-distro list安装完后我的手机上显示的是ubuntu-noble-aarch64-pd-v4.18.0。实在是很长如果你也嫌长的话可以重命名proot-distrorenameubuntu-noble-aarch64-pd-v4.18.0 ubuntu4. 登录Ubuntu登录很简单proot-distro login ubuntu如果出错显示Error: container ubuntu is not installed.多半是因为容器名不一致。此时你有两个选择1. 返回上一步把容器重命名为ubuntu再登录2. 运行proot-distro login ubuntu-noble-aarch64-pd-v4.18.0也可以登陆反正去查proot-distro list5. 安装必要的包登录ubuntu后就可以开始安装必要的包了。执行aptupdateaptinstalllibswresample-dev libavutil-dev libpango1.0-dev fonts-noto-cjk ffmpeg libpangocairo-1.0-0 libavformat-dev pkg-config gir1.2-pango-1.0 libcairo2-dev libswscale-dev libfontconfig1-dev libavdevice-dev build-essential libfreetype6-dev python3-dev libavcodec-dev libavfilter-dev python3-pip libglib2.0-dev必要的包安装完了现在开始安装manim。国内网络环境下建议使用国内 PyPI 镜像例如清华、阿里云等。这里以腾讯云为例pipinstallmanim-ihttps://mirrors.cloud.tencent.com/pypi/simple/ --break-system-packages解释一下--break-system-packagesDebian/Ubuntu 新版本 pip 默认禁止直接向系统 Python 安装pip包不过可以--break-system-packages绕过这个机制。但是这会污染系统 Python 环境所以如果计划在容器中做更多开发强烈建议使用python -m venv。当然如果整个容器内只运行manim的话问题也不大。一般来说到这一步就结束了可以正常使用manim了。6. 安装LaTeX \LaTeXLATEX这些操作是可选的。如果你有数学公式渲染的需求就继续看下去吧若无数学公式渲染需求到这里就可以结束安装啦Texlive-full如果手机空间足够大例如你是土豪不想倒腾想省心那么安装texlive-full即可。aptinstalltexlive-full这会下载8GB的内容然后一切都会自动配置好不需要人工干预。TinyTex如果你觉得8GB太太太大了我就是这么觉得的显然我不是土豪那么装TinyTex。不过会比较麻烦。执行aptinstallwgetwget-qO-https://tinytex.yihui.org/install-bin-unix.sh|sh自此TinyTex安装完毕。接着把TinyTex的LaTeX编译器加到环境变量中echoexportPATH$HOME/.TinyTeX/bin/aarch64-linux:$PATH~/.bashrc注意该路径适用于 ARM64aarch64设备但如果你的设备不是 aarch64则可通过uname -m确认架构并相应调整路径。重新登录logoutproot-distro login ubuntu检查whichlatex如果有输出那么配置正确。接着安装必要的包tlmgrinstallstandalone dvisvgm preview babel babel-english mktexlsrLaTeX \LaTeXLATEX就此安装完毕7. 中文支持如果需要支持中文那么还需要修改文件。推荐这样就一劳永逸了安装nano熟悉vim的也可以使用vimaptinstallnano接着用nano打开文件/usr/local/lib/python3.12/dist-packages/manim/utils/tex.pynano/usr/local/lib/python3.12/dist-packages/manim/utils/tex.py此时你会看到文件长这个样子Utilities for processing LaTeX templates.from__future__importannotations __all__[TexTemplate,]importcopyimportreimportwarningsfromdataclassesimportdataclass,fieldfrompathlibimportPathfromtypingimportTYPE_CHECKING,AnyifTYPE_CHECKING:fromtypingimportSelffrommanim.typingimportStrPath _DEFAULT_PREAMBLEr\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb}_BEGIN_DOCUMENTr\begin{document}_END_DOCUMENTr\end{document}#后面省略翻到_DEFAULT_PREAMBLE修改成这样#上面省略_DEFAULT_PREAMBLEr\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ctex}#下面省略然后CtrlO保存再Enter确认最后CtrlX退出编辑。接着如果你安装的是tinytex安装了texlive-full的忽略这一步还要执行tlmgrinstallctex测试安装完成后可以写一个Manim场景保存到main.pyfrommanimimport*importrandomimportnumpyclassCongratulations(Scene):defconstruct(self):bannerManimBanner().scale(0.5)congratulationText(Congratulations!\nYour Manim installation was successful.).next_to(banner,DOWN).scale(0.8)self.play(banner.create(),Write(congratulation))confettiVGroup()colors[RED,BLUE,GREEN,YELLOW,PURPLE,ORANGE,PINK,TEAL]shapes[Rectangle(width0.08,height0.08,fill_opacity0.9,stroke_width0),Circle(radius0.04,fill_opacity0.9,stroke_width0),Triangle(radius0.07,fill_opacity0.9,stroke_width0)]foriinrange(120):pshapes[random.randint(0,len(shapes)-1)].copy().set_color(colorrandom.choice(colors))p.move_to([random.uniform(-6,6),-3.5,0])p.velocitynumpy.array([random.uniform(-0.6,0.6),random.uniform(1.8,2.8),0])p.rotate(random.uniform(0,TAU))p.angular_velocityrandom.uniform(-2,2)p.gravity-0.6p.fade_startFalseconfetti.add(p)defupdate_particles(mob,dt):forpinmob:p.shift(p.velocity*dt*3)p.velocity[1]p.gravity*dt*3p.rotate(p.angular_velocity*dt*3)ifp.velocity[1]0andnotp.fade_start:p.fade_startTrueifp.fade_start:p.set_opacity(max(0,p.get_fill_opacity()-0.01))confetti.add_updater(update_particles)self.add(confetti)self.play(banner.expand())self.wait(3)self.play(FadeOut(banner),FadeOut(congratulation))接着运行以下命令测试manim -ql main.py如果能成功生成视频那么恭喜你的manim可以正常使用了。还可以继续测试LaTeX \LaTeXLATEX代码保存到latex.pyfrommanimimport*classTestLaTeX(Scene):defconstruct(self):eulerMathTex(r\text{Eulers Formula: }e^{i\pi} 1 0)binomialMathTex(r\text{Binomial Theroem: }(ab)^n \sum_{k0}^n{\rm C}_n^ka^{n-k}b^k)taylorMathTex(r\text{Taylor Expansion: }e^x \sum_{n0}^{\infty}\dfrac{x^n}{n!})gravityMathTex(r\text{Gravity: }F G\dfrac{m_1 m_2}{r^2})integralMathTex(r\text{Integral: }\int e^{x} \,{\rm d}x e^{x} C)formulaeVGroup(euler,binomial,taylor,gravity,integral).arrange(DOWN,aligned_edgeLEFT).center()self.play(Write(formulae,lag_ratio0.01))self.wait(1)self.play(FadeOut(formulae))执行manim-qllatex.py如果能成功生成视频那么恭喜你的LaTeX \LaTeXLATEX也可以正常使用了。对于中文代码保存到ctex.pyfrommanimimport*classTestChineseLaTeX(Scene):defconstruct(self):eulerMathTex(r\text{欧拉公式}e^{i\pi} 1 0)binomialMathTex(r\text{二项式定理}(ab)^n \sum_{k0}^n{\rm C}_n^ka^{n-k}b^k)taylorMathTex(r\text{泰勒展开}e^x \sum_{n0}^{\infty}\dfrac{x^n}{n!})gravityMathTex(r\text{万有引力}F G\dfrac{m_1 m_2}{r^2})integralMathTex(r\text{不定积分}\int e^{x} \,{\rm d}x e^{x} C)formulaeVGroup(euler,binomial,taylor,gravity,integral).arrange(DOWN,aligned_edgeLEFT).center()self.play(Write(formulae,lag_ratio0.01))self.wait(1)self.play(FadeOut(formulae))执行manim-qlctex.py如果依然能成功生成视频那么恭喜你的中文LaTeX \LaTeXLATEX环境配置成功。当然如果遇到了什么问题也欢迎在评论区交流。结尾至此你已经拥有了一个手机版的动画引擎啦当然手机CPU肯定没有电脑CPU那么强悍因此渲染视频没有电脑那么快不要要求太高哦码字不易记得点赞收藏哦我们下期再见下载链接Termux 适用于Android 7下载文件termux-appv0.119.0-beta.3apt-android-7-github-debuguniversal.apk百度网盘https://pan.baidu.com/s/1DCpT4Vmb3hv6wFT54BLs0Q?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_universal.apk其他版本可也可前往Github下载Termux 适用于Android 7arm64-v8a下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugarm64-v8a.apk百度网盘https://pan.baidu.com/s/1znolVwBiKcGSg5rGu_jbaw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_arm64-v8a.apk其他版本可也可前往Github下载Termux 适用于Android 7armeabi-v7a下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugarmeabi-v7a.apk百度网盘https://pan.baidu.com/s/1CJgzQcBCZzginUv8khWDZQ?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_armeabi-v7a.apk其他版本可也可前往Github下载Termux 适用于Android 7x86_64下载文件termux-appv0.119.0-beta.3apt-android-7-github-debugx86_64.apk百度网盘https://pan.baidu.com/s/1zlr9BQG3GWKYKyJ4rTwsFw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-7-github-debug_x86_64.apk其他版本可也可前往Github下载Termux 适用于Android 5/6下载文件termux-appv0.119.0-beta.3apt-android-5-github-debuguniversal.apk百度网盘https://pan.baidu.com/s/1UN78Kknhx92JyxeY8MiV7w?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_universal.apk其他版本可也可前往Github下载Termux 适用于Android 5/6arm64-v8a下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugarm64-v8a.apk百度网盘https://pan.baidu.com/s/1xb1cUFbxD0SgcrZBnqJB4A?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_arm64-v8a.apk其他版本可也可前往Github下载Termux 适用于Android 5/6armeabi-v7a下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugarmeabi-v7a.apk百度网盘https://pan.baidu.com/s/1nWw5E9Iq0TEjZNdPoksbUw?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_armeabi-v7a.apk其他版本可也可前往Github下载Termux 适用于Android 5/6x86_64下载文件termux-appv0.119.0-beta.3apt-android-5-github-debugx86_64.apk百度网盘https://pan.baidu.com/s/1X-5JzUxKXNlIhRQWSk-k-w?pwd0000Githubhttps://github.com/termux/termux-app/releases/download/v0.119.0-beta.3/termux-app_v0.119.0-beta.3apt-android-5-github-debug_x86_64.apk其他版本可也可前往Github下载Ubuntu容器适用于arm64-v8a下载文件ubuntu-noble-aarch64-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1CpuLVOsFQ5z_hp-SnFVekA?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-aarch64-pd-v4.18.0.tar.xzUbuntu容器适用于x86_64下载文件ubuntu-noble-x86_64-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1RjbBzGzWxhSgKLCQNy7VZA?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-x86_64-pd-v4.18.0.tar.xzUbuntu容器适用于armeabi-v7a下载文件ubuntu-noble-arm-pd-v4.18.0.tar.xz百度网盘https://pan.baidu.com/s/1merhqhqcUPGZIR3_8Vv_Ig?pwd0000Githubhttps://github.com/termux/proot-distro/releases/download/v4.18.0/ubuntu-noble-arm-pd-v4.18.0.tar.xzManim测试文件下载文件Manim 可渲染脚本.zip百度网盘https://pan.baidu.com/s/1g1A1sDSbqW3lvwGf5wGPVA?pwd0000