我对社区manim有个奇怪的问题。我已经安装了所有的帮助文件,所以我只需要安装manim,它似乎工作得很好。然而,我看到了一些我不理解的奇怪行为。下面是一个名为scene.py的示例程序(两个示例都取自Community Manim文档):
from manim import *
class CreatingMobjects(Scene):
def construct(self):
circle = Circle()
self.add(circle)
self.wait(1)
self.remove(circle)
self.wait(1)
class VectorArrow(Scene):
def construct(self):
dot = Dot(ORIGIN)
arrow = Arrow(ORIGIN, [2, 2, 0], buff=0)
numberplane = NumberPlane()
origin_text = Text('(0, 0)').next_to(dot, DOWN)
tip_text = Text('(2, 2)').next_to(arrow.get_end(), RIGHT)
self.add(numberplane, dot, arrow, origin_text, tip_text)当我运行命令python -m manim scene.py CreatingMobjects -p -ql时,一切都很正常,电影也会像预期的那样弹出。但是,如果我运行命令python -m manim scene.py VectorArrow -p -ql,它就不能工作。首先在屏幕上打印的是./manim/media/videos/scene/480p15/partial_movie_files/VectorArrow/partial_movie_file_list.txt: Invalid data found when processing input,然后它会说,The file ./manim/media/videos/scene/480p15/VectorArrow.mp4 does not exist.我真的很困惑,为什么其中一个可以工作,而另一个不能。我对manim非常陌生(显然),我认为这些非常简单的例子将是一个很好的起点,但我已经不明白发生了什么。任何帮助都将不胜感激。
发布于 2021-03-16 00:48:30
在self.add(numberplane, dot, arrow, origin_text, tip_text)之后添加self.wait(1)。那么脚本应该可以工作了。
https://stackoverflow.com/questions/66600276
复制相似问题