# Line Plotter

Intricate artworks using a robotic drawing machine.

##### technologies used

Processing 2, Custom 2D Line Plotter

##### course

In this assignment I created beautiful, intricate symmetric artworks using a robotic 2D drawing tool called a line plotter. The artworks were actually created using a previous assignment's code, and the result turned out to be a great tool for visualizing mathematical equations and the effect of variables, as well as what coding loops like "while" and "for" loops can do, visually!

*You can view the original project documentation on our class website for the looping gif assignment and the line plotter assignment.*

## Cycloid Circles

The code for my plot designs are actually based on this earlier assignment, one that focused on creating an infinite looping pattern in the form of a GIF file. After some experimentation, I developed a code that animates these layered circles in a cycloid pattern.

You can view the source code on GitHub.

The designs actually use a modified version of the code to create the cycloid circles.

Instead of drawing the circles themselves, I tried plotting their center points throughout their paths of movement (within a circle, within a circle, etc). This worked out beautifully, creating an intricate, delicate looking pattern.

In order to use a line plotter, the designs needed to be exported as a generic vector file format, which in this case was a PDF file. Dots, lines and fills are all accepted shape formats. The layers dictate the order in which it will be drawn.

A line plotter is just a machine holding any drawing device and moves on a 2D plain using X and Y axis coordinates.

In my case, I wanted to use a thick silver gel pen on black paper, to really have my designs pop in a way they can't on a screen. Drawing a single design took up to 6 hours sometimes.

*-1.5+i* and *-0.5+(ix1.5)*, two final prints

## Variations

By changing the equation affecting the primary variable

i, I can create several variations. Some turned out simple but beautiful, others would run for mintues before they completed a loop, churning out complex, intricate designs.This proved to be an educational, effective way to visualize math (such as the effect of variables) and coding (the power of loops and such).

`import processing.pdf.*; boolean bRecordingPDF; void setup() { size(1000, 1000); background(255); strokeWeight(2); bRecordingPDF = false; if (bRecordingPDF) { beginRecord(PDF, "render.pdf"); } } boolean canfreeze = true; void draw() { if(canfreeze && millis() > 6770) { endRecord(); bRecordingPDF = false; noLoop(); } float ballR = min(width, height)/3; float pathR = min(width, height)/3 - ballR/3; float mDiv = 1000.0; float t = millis()/mDiv; float x = width/2.3+pathR*cos(t); float y = height/2+pathR*sin(t); for(int i=0; i<3; i++) { //CHANGE THIS NUM: float var = 3+i; fill(0); mDiv /= 2; t = millis()/mDiv*var; pathR = pathR/2; x = x+pathR*cos(t); y = y+pathR*sin(t); point(x,y); } } //void mouseClicked() { // noLoop(); // saveFrame(); //} void keyPressed() { endRecord(); bRecordingPDF = false; }`

plot.pde (source)## Processing

Creates vector-based intricate designs for a line plotter

## View the basic loop source code

## View the plotter source code