Andrew Pehrson,
Kristina Concepcion
AP Calculus
Dr. Scholl

           This project required a variety of parts. Such parts are: a program that processes the images according to the mathematics, a photo editing program, test images and final artworks. The program processes the image by importing the images that are in the directory and cropping it to only the right half. This is due to the fact that both halves overlap and the program doesn’t know how to process it due to the program being unable to handle having two input points map to the same output point. To process the left half of the image, a mirrored image is ran through and is later processed in Photoshop to overlay it onto the outputted right half. After the image is cropped the program defines the function that will be used and how it should behave in vector space. The program then create and empty numpy array, which is a matrix of numbers that creates a colored image, It is filled with ‘nan’ or empty placeholders. Finally the program makes the point according to linear transformations that are defined with the function. A sub process insures that colored pixels won’t get covered with white pixels. The array comes out of the transformation looking like this…

 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…
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…
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.

Some problems we ran into while creating the program was that when we tried to translate images with inverse polynomials the image would shrink instead of increase so when the program got to the edge of the original image but wanted to map more on the new image it would repeat the color on the edges of the original image had. This gave an image such as this.

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


YouTube Series: inspiration for starting this project.

Documentation: source code used for this project (minimum modifications made).

Imaginary numbers Art

Concepts of higher dimensions in imaginary data is artistically displayed.