Imaginary numbers Art
Andrew Pehrson,
Kristina Concepcion
AP Calculus
Dr. Scholl
6/21/17

To fix this the function called inpainting is used. This creates a mask that fills in the empty spaces with predicted colors. The array is then saved as a .jpg, given a custom name and saved in a subdirectory called “newImage”. The program has multiple for-loops that will run every image through every equation. The exported images are then opened in photoshop and the reflected images outputs are flipped to line up to the non flipped images discontinuity. The images are then overlapped and the photoshop function called layer blend is applied. The final image is then put on display for all to marvel at. The outputted images show many interesting properties about complex numbers. One of the biggest points to this process is that the image has to be done in halves. This is fundamentally because of a discontinuity that goes from 0 outwards in some direction which correlates to the translation of the image in vector space.
The reason for this discontinuity makes more sense when looking at an inverse function. The top image will map to the right half of the original image with the function f(x)=sqrt(x) and the bottom image maps to the left side of the original image with the function f(x)=-sqrt(x) . For ease of explanation later, let’s change the variables in the equation to…
w=f(x)=z^2
Now the reason that a graph can be made of w versus z is because both x and z are complex numbers meaning they’re defined by…
z=x+iy
w=u+iv
This means that to properly depict the behavior there are four variables needed to be shown. The only issue is that humans can’t quite conceptualized 4 dimensions so the best starting place for depicting the behavior is by making two graphs. One that shows x versus y and another showing u versus v. doing this will show the position of z and w respectively on the complex plain.

This is what the basis of the program is. It takes a image that shows the real and unreal parts of z and makes an image of the real and unreal parts of w. The issue is however that points map onto each other and so there’s an ambiguity on where the value came from and what original position to look at. This is why in figure one the image was split into two sections. The top being and the bottom being . Now although looking at the function this way makes sense and it’s possible to switch back and forth without confusion, the discontinuity makes it so that the derivative or integral of theres functions can be taken. The solution to this is to create a riemann surface.

This Riemann surface will be a three dimensional graph where the the and planes intersect at their discontinuity. The three dimensions of the graph are x,u,and v which makes it so that the discontinuities intersect. When finding the path across the intersection y has to be mapped. This is done by defining a map to y and graphing it.

The reason dealing with this discontinuity and creating Riemann surfaces is important is because it helps find the complex roots of a function which is necessary in complex optimization. For our project we only used three basic polynomials… x^2, x^3, x^4. the difference between the polynomials show how the complex numbers shift. This is most easily seen in vector space where the angle from zero is multiplied by the degree of the polynomial. Along with this the radius increases.


Another issue we ran into was that the program couldn’t crop the left half of the image because cropping from the left half worked fundamentally different than what we had originally. This was fixed by just flipping the image in photoshop.
Test Images
Raw Images
Final Images


Accreditation
YouTube Series: inspiration for starting this project.
Documentation: source code used for this project (minimum modifications made).