Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

Implicit plot with complex function

I have a complexe function f:CC, and want to draw the locus where f is in the interval [0,1]. I made the following (where f is my complex function):

x=var('x');assume(x,'real');
y=var('y');assume(y,'real');
F=f.subs(z==x+I*y)
P=lambda x,y:F.subs(x=x,y=y).real();
Q=lambda x,y:F.subs(x=x,y=y).imag();
region_plot([P(x,y)<=1,P(x,y)>=0,Q(x,y)==0], (x,0,5), (y,-1,1))

That works well for small functions (low degree) but for big functions it's too long. I think there should be something better. I've seen for example the function complex_plot works well even for big functions and seems to do something more complex.

Does somebody has any idea?

Thanks

Implicit plot with complex function

I have a complexe complex function f:CC, and f:CC and want to draw the locus where f is in the interval [0,1]. [0,1].

I made the following (where f is my complex function):

x=var('x');assume(x,'real');
y=var('y');assume(y,'real');
F=f.subs(z==x+I*y)
P=lambda x,y:F.subs(x=x,y=y).real();
Q=lambda x,y:F.subs(x=x,y=y).imag();
region_plot([P(x,y)<=1,P(x,y)>=0,Q(x,y)==0], (x,0,5), (y,-1,1))
x = var('x')
assume(x, 'real')
y = var('y')
assume(y, 'real')
F = f.subs(z == x + I*y)
P = lambda x, y: F.subs(x=x, y=y).real()
Q = lambda x, y: F.subs(x=x, y=y).imag()
region_plot([P(x, y) <= 1, P(x, y) >= 0, Q(x, y) == 0], (x, 0, 5), (y, -1, 1))

That works well for small functions (low degree) degree) but for big functions it's too long. long. I think there should be something better. I've seen for example example the function complex_plot complex_plot works well even for big functions functions and seems to do something more complex.

Does somebody has any Any idea?

Thanks

Implicit plot with complex function

I have a complex function f:CC and want to draw the locus where f is in the interval [0,1].

I made the following (where f is my complex function):

x = var('x')
assume(x, 'real')
y = var('y')
assume(y, 'real')
F = f.subs(z == x + I*y)
P = lambda x, y: F.subs(x=x, y=y).real()
Q = lambda x, y: F.subs(x=x, y=y).imag()
region_plot([P(x, y) <= 1, P(x, y) >= 0, Q(x, y) == 0], (x, 0, 5), (y, -1, 1))

That works well for small functions (low degree) but for big functions it's too long. For example with f(z)=(z46z3+12z28z)(z1)3(z3)(2z3)(z2)3z there is no problem (a few second), but with f(z)=(z816z7+108z6400z5+886z41200z3+972z2432z+81)(z2)6(z4)z(6z448z3+140z2176z+81)(z1)4(z3)4 that's too long. I think there should be something better. I've seen for example the function complex_plot works well even for big functions and seems to do something more complex.

Any idea?