CoCalc Public Filescomputations / 2021-06-25-complex circle.sagews
Author: William A. Stein
Views : 62
Description: Plot of a complex circle, inspired by https://youtu.be/9WavaUED5i8
Compute Environment: Ubuntu 20.04 (Default)

I wonder what the plot of $x^2 + y^2 = 1$, with $x,y \in \CC^2$ looks like?

It's a 2-dimensional surface inside a four dimensional $\RR^4$, so to visualize it, we need to map it to $\RR^3$ somehow.

How? There are of course many ways, so let's just do one arbitrary way first, e.g., setting the imaginary part of the second complex number to 0, i.e., we are projecting to that space...

In any case, the surface in $\RR^4$ is $(x_0+i x_1)^2 + (y_0 + iy_1)^2 = 1$

R.<x0,x1,y0,y1> = QQ[]
R2.<I> = R[]
R3.<i> = R2.quotient([I^2+1])
f = expand((x0+i*x1)^2 + (y0+i*y1)^2); show(f)

$\displaystyle \left(2 x_{0} x_{1} + 2 y_{0} y_{1}\right) i + x_{0}^{2} - x_{1}^{2} + y_{0}^{2} - y_{1}^{2}$
f.list()

[x0^2 - x1^2 + y0^2 - y1^2, 2*x0*x1 + 2*y0*y1]

So the equations of the surface in $\RR^4$ is:

$x_0^2 - x_1^2 + y_0^2 - y_1^2 = 1$ $x_0x_1 + y_0y_1 = 0$

Hmmm, it's tempting to eliminate one variable, and end up with a surface in $\RR^3$, so might as well do that. We have $y_1 = -x_0 x_1 / y_0$ so $x_0^2 - x_1^2 + y_0^2 - (-x_0 x_1 / y_0)^2 = 1$

Multiply through by $y_0^2$:

$x_0^2 y_0^2 - x_1^2 y_0^2 + y_0^4 -x_0^2x_1^2 = y_0^2.$

var('x,y,z')
f = x^2*y^2 - z^2*y^2 + y^4 - x^2*z^2 == y^2
show(f)

(x, y, z)
$\displaystyle x^{2} y^{2} + y^{4} - x^{2} z^{2} - y^{2} z^{2} = y^{2}$

complex_circle = implicit_plot3d(f, [x,-2,2], [y,-2,2], [z, -2,2], mesh=.05, opacity=0.4, color='green')
real_plane = plot3d(0, [x,-2,2], [y,-2,2], color='blue', mesh=.1, opacity=0.2)
circle2d = circle([0,0], 1, color='red', thickness=5)
complex_circle+real_plane + circle2d


3D rendering not yet implemented