【Manim】設(shè)計 travel() 函數(shù),連續(xù)轉(zhuǎn)變向量化數(shù)學(xué)對象 VMobje
2023-05-20 18:19 作者:安潔莉娜-想創(chuàng) | 我要投稿


??def travel(self, VMob: VMobject, lst: list, fun = Transform, succ = False,?deadhesion = False):
????if succ:
??????self.play(Succession(*(fun(VMob, i) for i in lst)))
????else:?
??????for i in lst:
????????if deadhesion:?
??????????self.remove(VMob)
????????self.play(fun(VMob, i))
????????if deadhesion:?
??????????self.remove(VMob)
????????VMob = i
??????if deadhesion:?
????????self.add(VMob)
????return self
標簽: