问题描述
我运行此代码:
from manimlib import *
class SquaretoCircle(Scene):
def construct(self):
circle = Circle()
self.play(ShowCreation(circle))
self.play(circle.animate.shift(2 * RIGHT),circle.animate.scale(0.25))
它是来自 https://3b1b.github.io/manim/getting_started/quickstart.html 的缩短示例。但是,圆圈没有按照 circle.animate.shift(2 * RIGHT)
的指定向右移动,如图 here 所示。
解决方法
我找到了同时做两个动画的正确方法
from manimlib import *
class SquareToCircle(Scene):
def construct(self):
circle = Circle()
self.play(ShowCreation(circle))
self.play(circle.animate.shift(2 * RIGHT).scale(0.25))