1 | initial version |
Some approximation :
var('x,y')
cm = colormaps.jet
pi2 = 2 * pi.n()
def f(x, y):
z = x + I * y
return (z-2)/(z+3)**2
def cf(x, y):
return f(x, y).n().arg() / pi2 + 0.5
plot3d(lambda x, y: f(x, y).n().abs(), (x,-4,4), (y,-4,4), color=(cf, cm))
2 | No.2 Revision |
Some approximation :
var('x,y')
cm = colormaps.jet
pi2 = 2 * pi.n()
def f(x, y):
z = x + I * y
return (z-2)/(z+3)**2
def cf(x, y):
return f(x, y).n().arg() / pi2 + 0.5
plot3d(lambda x, y: f(x, y).n().abs(), (x,-4,4), (y,-4,4), color=(cf, cm))