Thousand Lines: Circular Motion
I am intrigued by both the organic movement that can be created with circular motion and the oddly-curved shapes that can be drawn with lines, so I decided to combine the two. The overall motion is reminiscent of curtains flapping in a light breeze. To meet the thousand line requirement, this sketch draws 600 white lines and overlays them with 400 black lines to create a mesh-like pattern.
//Miranda Jacoby
//EMS Interactivity Section A
//majacoby@andrew.cmu.edu
//Copyright Miranda Jacoby 2014
// Circular motion addapted from Heisei's code,
// which can be found on OpenProcessing.org at
// https://openprocessing.orgsketch/106191
//Variables for circular movement
int constant = 10;// anchor point
float angle = 0.05;// roational angle
int scalar = 150;// size of rotation
float speed = 0.05;// speed of rotation
void setup(){
size(600, 600);
strokeWeight(.5);
}
void draw(){
background(0);
angle = angle + speed;
float x = constant + sin(angle) * scalar;
float y = constant + cos(angle) * scalar;
for (int i = 0; i <= 100; i++) {
stroke(255, 255, 255);// white lines
//line(x, y, x + width + 100, y + height + 100);
//The exclusion of x from the second set of coordinates
//creates the angled fan effect in the lines' position.
line(y, x, y + (width/2) + 100, (height/2) + 100);
y = y + 6;
x = x + 6;
}
for (int i = 100; i <= 200; i++) {
//line(x, y, x + width + 100, y + height + 100);
line(y, x, y - (width/4) - 100, (height/4) - 100);
y = y - 6;
x = x - 6;
}
for (int i = 200; i <= 300; i++) {
// stroke(200, 200, 250);
//line(x, y, x + width + 100, y + height + 100);
line(y - 10, x - 200, y + (width/2) + 100, (height/2) + 100);
y = y + 6;
x = x + 6;
}
for (int i = 300; i <= 400; i++) {
//line(x, y, x + width + 100, y + height + 100);
line(y - 10, x - 200, y - (width/4) - 100, (height/4) - 100);
y = y - 6;
x = x - 6;
}
for (int i = 400; i <= 500; i++) {
// stroke(100, 150, 200);
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 400, y + (width/2) + 100, (height/2) + 100);
y = y + 6;
x = x + 6;
}
for (int i = 500; i <= 600; i++) {
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 400, y - (width/4) - 100, (height/4) - 100);
y = y - 6;
x = x - 6;
}
stroke(0); // black lines
for (int i = 600; i <= 700; i++) {
// stroke(100, 150, 200);
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 600, y + (width/2) + 100, (height/2) + 100);
y = y + 6;
x = x + 6;
}
for (int i = 700; i <= 800; i++) {
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 600, y - (width/4) - 100, (height/4) - 100);
y = y - 6;
x = x - 6;
}
for (int i = 800; i <= 900; i++) {
// stroke(100, 150, 200);
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 800, y + (width/2) + 100, (height/2) + 100);
y = y + 6;
x = x + 6;
}
for (int i = 900; i <= 1000; i++) {
//line(x, y, x + width + 100, y + height + 100);
line(y - 20, x - 800, y - (width/4) - 100, (height/4) - 100);
y = y - 6;
x = x - 6;
}
//for (int i = 200; i <= 300; i++) {
// //line(x, y, x + width + 100, y + height + 100);
// line(y, x, y - (width/3), (height/3));
// y = y - 6;
// x = x - 6;
//}
}