# COS 126 Recursive Graphics Submissions, Fall 2010

NAME AND DESCRIPTION N = 1 N = 2 N = 3 N = 4 N = 5 N = 6
Hannah Safford

In honor of Halloween, I drew a spooky tree. The tree has two recursive parts: the branches and the web. I used geometry and graph paper to figure out where to place all of the vertices for the hexagons, branches, and web-branch connecting lines. I also spiced up the drawing by adding some external image files: an orange background, grass, a witch, and clouds.
Shiro Kuriwaki

Last Friday I went to the Museum of Modern Art(MoMA) in NYC with my Zee group, and saw great paintings of Pier Mondrian, a Dutch painter. Programming was hard at first, but when I arbitrarily decided to use an x-y plane and variables that governed each rectangle, I felt the rest of it was fast. The StdRandom API was useful in generating random lines and colors.
Xufan Zhang

My "artistic" creation is Hilbert curve, a curve which is able to cover the whole plane, or well known as a "2D curve". I define 4 types of "U" shapes which together form the curve. The key point is to draw the bridges across all curves. (Actually, it is the bridges that form the whole curve.) To add some taste, I incorporated random colors and "case-dependent" line thickness.
Kuni Nagakura

Using the idea of recursive functions, my art.java takes in an integer commandline argument N and draws an n layered apartment that builds two towers on top of every layer.

I decided to make something natural and I remembered the kind of drawings I used to make when I was little. With a lot of birds flying in the sky and how sometimes it looked like a pattern.
Alex Fish

Some of the lines don't appear in the reduced size images; you can click on each picture to see the true image. My art is comprised of 3 cubes extending from the top, left, and right faces of the predecessor cube, with each of the new cubes' sides being reduced by a factor of 1/3 in the process. To create a 3-D effect, I drew hexagons with extra lines. My creation was inspired by the first design from this website: http://sites.google.com/site/geometricarts/fractals
David Wang

My program takes a command line integer argument and generates a recursive picture that contains an initial cube and then produces a cube one quarter as big at each vertex of the original cube. I came up with the idea on my own. I drew the cubes by drawing two squares whose centers differed by half the current size.
Dragos Potirniche

My program, Art.java, draws the famous Koch snowflake.
Brendon Vetter

My artistic creation starts with an N-pointed star, creates an N-1-pointed star at each point, and keeps on doing this until it reaches N=3 (with 3- and 4-pointed stars being triangles and squares, respectively), and each different star is a random color. First I wrote the code that created N points evenly spaced around the circumference of a circle.
Dmitriy Kunisky

My artistic creation creates an Apollonian circle gasket, a fractal image consisting of circles within circles, where each new circle is created in the central "gap" between three mutually tangent circles. The argument passed is used to determine the maximum level of "depth" to which the program recurses. The initial radii of the three starting circles can be changed inside the program to create different designs. My program required complex number arithmetic to compute the centers of the circles, so I extended the Complex class found in the book on page 393 to have some extra functions (such as square root, argument, etc), and used this in my Art.java program.
Lisa Yankowitz

My artistic creation draws the hand-holding paper dolls that children make. Each doll is a series of polygons with a circle for a head, and outlined with black lines. The background is an image of the earth from http://alexchristian.com/blog/vote-earth-iphone-app.
Brian Huang

Spiral Galaxy. It is not readily apparent that it is a fractal, but that is simply because I use the "sub-arms" to solidify, lengthen, and thicken the "super-arm" (note: since the arms are themselves composed of randomized clusters of points, as the length of the arms increase, the space between the clusters increases, making it necessary to solidify them. The thickening is for aesthetic effect). The arms are also programmed to get yellower as they extend away from the center of the galaxy. I got the idea of playing with pixels from Bohao Liu's artistic creation, and the concept of spiraling arms from Irene Lo's artistic creation.
Anna Kornfeld Simpson

My artistic creation is a recursive series of rotated bear faces. Each bear face contains eyes, a nose and ears. The eyes and ears are rotated so that the top of each bear's head faces its parent. I designed the program first by treating the bears as circles and determining their position and distance from each other. This required a bit of trigonometry. Then I added the rotation of the ears and eyes given the angle.
Philip Rosen

It is a recursive rose. Honestly I went through a lot of trial and error. I messed around with angles and various add-ons. Finally I changed the colors.
Max Silver

I wrote a program that recursively plots "S"'s. It first plots an "S" using 14 lines. It then plots 4 half-sized "S"'s at each corner of the original "S". However, if this repeated, there would be a lot of overlapping. So after the first round of new "S"'s, it only produces 3 more around each corner "S."
John McSpedon

For my art.java, I wanted to simulate a Lichtenberg figure (basically a lightning bolt etched in an insulator). Lichtenberg figures are an instance of diffusion-limited aggregation, which amounts to Brownian motion in its simplest form. I basically combined a lightning bolt-esque tree function with an adapted version of the Brownian.java program. This resulted in a recursive function nested within a recursive function. Art.java starts looking fairly accurate at around N = 5 and can be tweaked via some of the program's internal parameters.
Olivia Wiles

My artistic creation is reminiscent of an oriental rug design where diamonds grow out from the center of the rug (each is one half the size of the one before it). What was hard was not drawing diamonds on all the different sides of the original diamond in subsequent iterations of the program. I made a second paramater to keep track of whether the last diamond had been drawn. Each subsequent diamond is a repetition of the one before.
Dan Marks

My art begins with a vertical line through the center of the screen. Two horizontal lines of this length branch off from this long one (from a random point along the longer line, and randomly to either the left or right). This continues for the inputted value of increasingly smaller lines.
Sebastian Gold

My inspiration was the picture of a tree over the Forbes fireplace (on the opposite side of the living room as the piano). I used the book to look up how to define colors, draw lines, and set pen radius (and some other functions of StdDraw). I made it different from the conventional branching tree (branch length halving, splitting into two with a 60 degree angle) in order to make it more realistic: I used the golden ration [(1+ √5)/2] for branch length and location of the side branches and incorporated a small degree of randomness in the angle every branch makes with the previous branch.
max yano

it draws a line of fish tapering both ways and with smaller fish inside of each. the tricky part was creating the two additional variables to create three different patterns - so that each fish didnt create both one to the right and to the left(the ones to the right of the first fish only created children to the right and inside, the ones to the left only made children to the left and inside, and the ones inside other fish only created further inner ones)
Elizabeth Hutton

My program creates a center flower with input argument (N) layers of petals. Spaced around this center flower are similar flowers, each with one less layer of petals. For instance, if N = 3, there would be one center flower with 3 layers, one bordering flower with two layers, and one bordering flower with one layer. With this program, you can see flowers of every different complexity, up to seven layers.