Ask Your Question

plot circle using complex numbers

asked 2024-06-27 23:34:13 +0200

KingUncrowned gravatar image

I want to plot the $z\in\mathbb{C}$ such that $|z-a|=2$ using the CDF function.

What I have tried is

a = CDF(3,0)
C1 = solve(CDF(z-a).abs()==2,z)

But I cannot use a symbolic expression.

My idea is to plot the points given in C. I would really appreciate any answer solving the problem using the ComplexDoubleField.

edit retag flag offensive close merge delete

1 Answer

Sort by ¬Ľ oldest newest most voted

answered 2024-06-28 09:58:11 +0200

Emmanuel Charpentier gravatar image

There is no need to use an explicit approximation ring ; use symbolic variables

One way :

sage: implicit_plot(lambda u, v:(u+I*v-3).abs()-2, (0, 6), (-3, 3))
Launched png viewer for Graphics object consisting of 1 graphics primitive

image description

edit flag offensive delete link more


Why is it not the same as implicit_plot(lambda u, v:(u+I*v-3).abs()-2==0, (0, 6), (-3, 3))?

KingUncrowned gravatar imageKingUncrowned ( 2024-06-28 10:12:25 +0200 )edit

Because lambda u, v:(u+I*v-3).abs()-2==0 will be True (and evalues at 1) for all the points of the circle (and will be Falseand evaluate at 0 for all the points outside the circle), which is the reverse of what we seek, and does not change sign between the inside and the utside of the circle.

See ìmplicit_plot?`for details and explanations.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-06-28 14:49:51 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2024-06-27 23:34:13 +0200

Seen: 109 times

Last updated: Jun 28