# COS 126 Recursive Graphics Submissions, Spring 2015

NAME AND DESCRIPTION N = 1 N = 2 N = 3 N = 4 N = 5 N = 6
Aleksandra Cvetkovic

I was inspired by designs I had used in high school when making quilts, as they often involve a simple, square-shaped unit that is repeated in a grid-like fashion. Online I found my template: a square made up of four L shapes spiraling around each other. To write the program, I drew four L-shaped polygons in different colors and recursively called them four times while scaling them down to one-fourth size. Rather than rotate the Ls to make pinwheels, I used an array to store the different possibilities for color assignments for the Ls.
Daniel Hahn

My Art.java creates a fractal recursive drawing of a polynomial with n sides, where n is the order of recursion as well. The largest polynomial is created by a recursive combination of smaller polynomials of n sides, although at the smallest level, each "polynomial" is actually just n lines radiating from a point. The only "extra" information I used was the Color API from oracle's website, as I wanted the color of each line drawn to be dependent on its x and y position to create a pleasing gradient of colors across the polynomial. This is the color API I referenced: https://docs.oracle.com/javase/6/docs/api/java/awt/Color.html
Owen Smitherman

I chose to draw a recursive tree, with multicolored branches that change colors as they get smaller. Also, smaller branches sprout off at set intervals as a double recursion e.g. when n was even and so on.
Seth Samelson

"Twisted, Drawn, and Quartered." I am not very visually inclined, but I wanted to make something that would incorporate randomness. This program draws four randomly tilted squares on the screen and draws an additional set of four randomly tilted squares within every square for every level of recursion. The color alternates at each level.
Ryan Hammarskjold

My art prints out a picture of a fern. A fern is a stem with smaller ferns on the both sides at different places along the stem. The ferns are of different sizes.
Humza Azam

Creates a snowflake out of repeating levels of pentagons. I first got the idea by searching up common fractals on Google, and while I could not figure out how to replicate exactly that one, I ended up making this into a snow flake. I figured out how to find the coordinates of a pentagon and then inverted them every level.
Kathleen Ma

I found the fractal I attempted to imitate here: https://wewanttolearn.files.wordpress.com/2014/11/02-t-square.jpg. My work of art prints recursive squares, and uses color and strategically placed recursive triangles to simulate the effect of shadows.
Eric Yang

My Art.java draws a dandelion in a field. I started with a snowflake fractal and tweaked things until it resembled a fluffy dandelion. The fractal basically draws two lines 40 degrees apart which each split into smaller lines also 40 degrees apart, and so on.
Alexander Byrnes

My program Art.java models the canopy level of a rainforest. It shows 7 trees that grow in a vertical direction, with branches that spread out to a flat top. Each branch stems 4 new branches that grow in a random direction. The background is of rain, and the ground is a green rectangle with blue ellipse puddles. To write this program, I first began by trying to create a simple tree. Then, I slightly manipulated my code so that the tree grew more vertical, and its top was flatter. I started without using a method for leaves, then at the end added in the leaves to just the last order. After I had done this for one tree, I began adding more and more, until I ended up with a total of seven trees, which amount to a pretty good model for the canopy.
Jeffrey Kuan

My artistic creation is the Gosper Island. I went about writing a program to produce this by first starting with a hexagon. Then, for each straight line segment, I made a zigzag pattern made out of three line segments, using an angle constant. At each step, I continued doing this recursively for each generated line segment. To make the fractal even more interesting, I made the order of the fractal also determine how many Gosper Islands would be drawn, with the side lengths of the initial hexagons forming a geometric series. As a final touch, I used information about color on pages 324-325 of the textbook to create a fiery color gradient.
Sajal Tiwary

This creation was inspired by the sign of the Deathly Hallows from the Harry Potter series. I first wanted to draw a spiral consisting of the symbol, and somehow set a recursion to allow it to continue until only the branches were visible. Each branch contains a recursion (which could have been accomplished with a loop, but much more complicatedly), and each branch then recurs to form the whole "snowflake." The level gives the depth of the flake by drawing smaller versions behind it; the flake gains more depth with each increase in level.
Jackey Liu

I drew a bunch of designs on paper until I found something I liked and could figure out how to program. I just added color and drew lines to give it a 3D look, and drew more triangles in each triangle. Finally I decided to make my own background too. Beacuse why not.
Tiancheng Zhang

I originally set out to create a nice Heighway dragon. However, in my lack of trig abilities, I managed to have my code instead create beautiful Levy C curves (differing in location and rotation of one of the recursive components) and have opted to submit the Levy C curve instead, since past students have submitted dragons but never Levy C curves. The recursion involves replacing each line segment with a U shape. The code generates Levy C curves of order N*2.
Xiao Yang Yu

I saw many fractal designs that resulted in trees and was inspired by a recent show I watched to create a sakura tree (cherry blossom tree) using recursion. My code draws a trunk that grows into 3 branches, that each grows into 3 other branches, and so on. When the order of recursion hits the base level, another method is called to draw pink petals on these topmost branches. I also implemented a few details that I believe contribute to the aesthetic appeal of the image produced. The thickness and size of branches are controlled to give a more natural look to the image; the direction of the new branches are random in an allowed interval; the size and amount of petals are inversely proportional. I also scaled the canvas to give the pink circles an apparent oval look (although they aren't really ovals) to give a feeling of hanging leaves.
Heidi Miller

My artistic creation is a hat made of squirrels on top of a tiger. My first hat did not have a pompom and it went off continuously instead of curving around. I fixed this by making a "velocity" for the y-direction of the hat. I also made several calls to the pompom program, which was similar to the hat program.
Julianna Wright

My artistic creation is a snowman army marching forward from the distance. The idea was to make something winter related. First I use tail recursion to build a snowman. (If I drew only one snowman I would lose points!) Then, I recursively draw groups of snowmen.
Mariah Wilson

At first, I struggled to think up a design that was interesting and distinct from the examples that were provided to us in class and the Sierpinski program, but I Googled fractal patterns. I worked with rectangles instead of the polygonal shapes that are present in the pattern I found online and attempted to achieve the same sense of mirroring and shifting. My program achieved this by shifting one vertex of each of the four rectangles up and down using "n", while at the same time doubling or halving the length of each triangle based on whether the value "n" is even or odd. Lastly, I added color, switching between two colors depending on if "n" is even or odd.
Theo Keeley-LeClaire

My program draws the golden dragon fractal, which is a recursion of two sides of a triangle scaled by a factor involving the golden ratio. The result is self-similar and consists of two differently-sized copies of itself that fit together. For more information, see http://ecademy.agnesscott.edu/~lriddle/ifs/heighway/goldenDragon.htm.
Komron Shayegan

I was inspired by the Koch fractal. (There was a link to it on the checklist for the assignment.) I just referenced my Sierpinski program on how to structure the recursion.
Agustina de la Fuente

I originally began by attempting to do a spiral out of squares. After playing with the recursion, I found a cool way to get the squares to become parallelograms and get closer and closer together by using exponentials. With these tools, I thought about my colors (I had decided from the beginning to use ROYGBIV), and imagined an egg shape. The final product looks like an Easter egg, which is appropriate for the upcoming holiday!
Christine Porr

I chose the Koch snowflake because I think snowflakes are one of the most beautiful images in nature. I chose to draw mine using lines rather than triangles since I had just written Sierpinski which uses triangles. I played with placing, moving, scaling, and rotating the snowflake so I could duplicate it and create a tile effect. After figuring out how to do this, I made main() call my recursive method so that it would draw decreasingly-sized concentric Koch snowflakes, each of which is made of 3 Koch curves. I chose to draw N Koch snowflakes in N colors, namely in the order of the colors of the rainbow. A monochromatic program would better show the tiling effect, but I like the use of colors simply for aesthetic appeal.
Valeria Ibarcena

I was inspired by baobab trees found in southern Africa, particularly a tree like this one: http://www.accessgambia.com/information/large/baobab-2.jpg. I used trigonometric functions to be able to calculate the four rectangle vertices as a function of the midpoint of the bottom side, wrote a for loop to do the same for the specified number of branches, and spread them out, randomly but within a range as a function of the number of branches. The height of each next iteration of branches is also random, as is the color, but within a range of browns. I also added a background picture, in keeping with the theme.
Daniel Wood

I was inspired by the tangle of knots in a ball of yarn, and tried to replicate this phenomenon by creating a recursive system of arcs which split at each level of recursion. Then I used advanced trig calculations to generalize the position of every point in the picture and used a for loop to rotate the entire image around the origin to create a tangled ball. Additionally, each level of recursion is assigned a color based of whether it is divisible by two or three. This allows the viewer to distinguish between the different levels of recursion. By manipulating the constants in the program, it is easy to change how large the arcs are and how many degrees they span.
Frederick Allen

This is Sierpinski's arrowhead curve. I first found it on the checklist for this assignment, and I was amazed to see that a pattern resembling Sierpinski's Triangle emerges from something that starts out so differently, so I wanted to see if I could write the code for it.
Benjamin Fridman

Initially I hope to model the idea behind an app for the iPhone which takes a picture from your camera roll and converts it into a wrapped-around "island". Also I wanted to have a landscape with ocean motif. I made waves for my water, and I created a background class with mountains and trees. I made a background that would always fill up the screen, and based on the order of the recursion would incorporate more but smaller graphics. I incorporated randomness into the heights of the objects and added a yellow background.
Samantha Ip

My artistic creation is a Pythagorean tree, colored to look like a cherry blossom tree. I was inspired by Natasha Turkmani's submission from Fall '14. I used the same website on the Pythagorean tree that she used: http://ecademy.agnesscott.edu/~lriddle/ifs/pythagorean/pythTree.htm