Mirrored Curves

by heidiqc

Inspired by the rotational artwork that I used to do when I was a kid, I wanted to create curves that could be rotated about a center point to form a piece of unique art.

I experimented with the various types of curves and random functions in processing until I came up with a set of randomly generated curves that looked satisfactory. The next challenge was to make the curves link up and form interesting arcs that did not repeat. Finally, I wrote some mathematical functions that would create a set of 4 curves rotated equally around the center axis. I wanted the user to have some input into the generation of the pattern, so I included the keyboard as a form of user interface so that the user could control when each new set of curves was generated, and change the color of the curves when desired to have a pattern with multiple colors.

Subsequently, embroidering was relatively straightforward. I didn’t run into trouble translating my pattern into the format that the embroidery machine required, although I didn’t attach the embroidery arm of the machine properly the first time, which caused the red and black pattern to shift out of place. The second time around, I experimented with a thicker stitch, but got stuck at the machine for an hour troubleshooting when it would start and seemingly stop randomly, telling me that the thread was broken when it was not. After rethreading the top thread and checking the bobbin at least 7 times while toggling with the tension, it magically finished the pattern. (yes!) I suspect the tension was the culprit, combined with the thicker stitches layering on top of each other to form a thick wad of thread. I am pretty satisfied with the designs, and I intend to make them into mats for holding hot pots eventually.

Processing Code:

// import library to create pdfs
import processing.pdf.*;
// initialize variables
int x1= 200;
int y1= 200;
int x2= int(random(100,300));
int y2= int(random(100,300));
// size of screen
int c = 400;
// setup
void setup(){
size(c,c);
background(238,232,170);
smooth();
beginRecord(PDF, “embroidery.pdf”);
}
void draw() {}
void keyPressed() {
// when q is pressed, save and quit
if (key== ‘q’) {
endRecord();
exit();
}
// if right or left is pressed, change color
else if(key== CODED) {
if (keyCode == RIGHT) {
stroke(205, 92, 92); // pink
} else if (keyCode == LEFT) {
stroke(0); // black
}
}
// generate 4 random numbers in space
int x3= int(random(0,c));
int y3= int(random(0,c));
int x4= int(random(0,c));
int y4= int(random(0,c));
// draw curve
noFill();
strokeWeight(3);
bezier(x1, y1, x2, y2, x3, y3, x4, y4);
// 2 repetitions
bezier(c-x1, c-y1, c-x2, c-y2, c-x3, c-y3, c-x4, c-y4);
// 4 repetitions
bezier(c-x1, y1, c-x2, y2, c-x3, y3, c-x4, y4);
bezier(x1, c-y1, x2, c-y2, x3, c-y3, x4, c-y4);
// make sure end of curve lines up
x1= x4;
y1= y4;
x2= x3;
y2= y3;
}