RAM: Flowing Patterns

screen-shot-2017-03-01-at-6-06-56-pmscreen-shot-2017-03-01-at-6-07-14-pmscreen-shot-2017-03-01-at-6-07-29-pmscreen-shot-2017-03-01-at-6-07-44-pmscreen-shot-2017-03-01-at-6-08-39-pm

 
void setup() {
size(700,700);
background(17,17,17);
}

boolean TF=true;
float x;
float y;
int sens=1;

void draw() {
if(mousePressed == true){
background(17,17,17);
for (int i=1; i<200;i+=20) {
for (int j=1; j<200;j+=20) {
noFill();
stroke(random(255),random(255),random(255));
strokeJoin(ROUND);
strokeWeight(3.5);
strokeCap(ROUND);
if (TF) {
x=mouseX;
y=mouseY;
}
line(i*2+150,j*2+170,abs(sens*(x-250)),abs(sens*(y-250)));
line(i*2+150,j*2+170,abs(sens*(y-250)),abs(sens*(x-250)));
}
}
}
}

Simone Sciacovelli

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s