为什么复变换在人体模型中的应用表现不佳



直线的复变换应该将直线映射到通过原点的圆,半径为1的1,0,0的圆的复变换也应该映射到直线,但它的行为很奇怪。

from manim import *
#config['frame_height'] = 10.0
#config['frame_width'] = 10.0
class Method(Scene):
def construct(self):
text = Tex(r"Applying Complex Transformations")
self.play(Create(text))
class Complex(Scene):
def construct(self):
d=ComplexPlane()
k=d.copy()
self.play(Create(d))
self.add(k)
line = Line(start=[2,0,0],end=[2,5,0],stroke_width=3,color=RED)
circle = Circle().shift(RIGHT)
self.add(line)
c = Circle().shift(RIGHT)
self.play(c.animate.apply_complex_function(lambda z:z**2)) #works correctly
self.play(line.animate.apply_complex_function(lambda z:1/z),run_time=5) #behaving wierdly
self.play(circle.animate.apply_complex_function(lambda z:1/z),run_time=5) #behaving wierdly

应用于线路

应用于圆形

函数1/z在z=0处发散,因此,从该位置(或其附近(开始的每个点都会出现问题,并产生奇怪的伪影。我试过你的代码,这行对我来说似乎很好,但圆圈可能会做一些奇怪的事情,碰巧圆圈在复杂平面中穿过(0,0(。试着再把它移一些,这样就不会发生这种事。

circle = Circle().shift(RIGHT*1.5)

当然,你也可以改变函数,使它在z=0时不发散。像1/(z+2(这样的东西应该可以工作

相关内容

最新更新