# Graffiti and Math

## Cartesian Coordinates

Graffiti artists often work on a piece in sketchbooks before they actually begin painting it. The sketchbooks sometimes use a grid to help plan out the design. Sometimes they go beyond planning, and create visual effects that look as if they were stretching or folding the grid. In the picture on the right, you can see someone who actually shows the folded grid, although this is rare. More commonly, you might see graffiti writers use the actual brickwork as a grid itself, as we can see in this picture below.

Whether it's a grid in a sketchbook, or a grid of bricks on a wall, these grids are much like the Cartesian coordinate system in mathematics. Let's see how we can map the Graffiti artist's grid onto the Cartesian coordinate system.

## Coordinates and Lines

In the Graffiti Grapher software we will use Cartesian coordinates to locate the start and finish of each line. Each coordinate is a pair of numbers. The X coordinate tells you how far left or right. The Y coordinate tells you how far up or down. Cartesian coordinates use both negative and positive numbers, so don't forget to use the "-" sign.

The most important lines in Graffiti Grapher are the borders. Every two borders gives you a "shape." A collection of shapes is called a "group." Here is a group of two shapes. Shape 1 has green borders, shape 2 has red borders.

## Polar Coordinates

Now that you've seen how to indicate location based on a pair of values (Cartesian Coordinates), it's time to look at a different way to express location on a grid - Polar Coordinates. Polar Coordinates use an angle and a distance from a center point (known as the origin) to determine location.

With an origin consisting of x and y coordinates, a distance r, and an angle a, you describe a polar coordinate.

## Arcs and Polar Coordinates

Using polar coordinates, we can draw the curved shape of an arc. Using the go to methods we discussed before, you can set the orgin of the arc anywhere. Then we can define the diameter of the arc, and the angle of the arc. For example, if sweep is 15 degrees, then the arc will go from 0 to 15, and if the sweep is 360 it will make a full circle.

## Arcs and Spirals

Some of the curves in graffiti are arcs of spirals. The radius for the arc of a circle never changes, but the radius of a spiral arc changes as the arc moves from one endpoint to another. Depending on how quickly the radius changes we call the arc different things.

Some arcs change radius by a factor of about 3 (2.7), we call these log spirals. These spirals grow at a rate controlled by a value C. They have a starting radius of “size” and start facing a certain direction and then go around in an arc until it reaches a given angle. As you draw you may want to change the width of your pen. You can use negative pen growth to shrink the pen, and positive to make it grow.

## Color Picker

When using the pen, you can use the "set pen color" block to change the pen color.

To change the color, simply click the color square, and pick a color from anywhere on the screen (even out side of the color spectrum box!)