Processing Study
Through the study of using processing, these sketches are made to showcase the usage the shape, color, and space. Every sketch of this collection can be interacting with your own cursor.
Wave
open source
float theta;
float easing = .1;
int frames = 250, num=200;

void setup(){ 
    size(1000, 600); 
    noStroke();
}

void draw() { 
    fill(#FEFF03); 
    background(#FEFF03); 
    stroke(#FF0313); 
    strokeWeight(.5);   

for (int i=0; i<num; i++) {   
float offset = TWO_PI/num*i;   
float d = map(sin(theta+offset*1), -10, 10, 80, 80);   
float x = width/2 + cos(theta+offset*2*easing)*d;   
float y = height/2 + sin(theta+offset*3)*d;   
ellipse(x,y,15,15);}  

theta -= TWO_PI/frames; 
}
Random
open source
float angle = 0;

void setup() {
    size(1000, 600); 
    background(#FEFF03);
}

void draw() {   
    textSize(50); 
    fill(#FF0313);   
    text("RANDOM", 400, 300);     
    fill(#FEFF03);   
    translate(mouseX, mouseY); 
    rotate(angle);   
    ellipse(-300, -300, 250, 250);   
    angle += 0.1;   
    stroke(#FF0313);
}

Zoom
open source
void setup(){ 
    size(1000,600);
}   

void draw(){ 
    background(#FEFF03); 
    fill(#FF0313); 
    stroke(#FEFF03); 
    strokeWeight(3); 
    for(int i = 0; i <= 25; ++i) {   
        float x = i*width/16.0;     
        float y = height/2.0;   
        float distance = dist(x,y,mouseX, mouseY);   
       
        ellipse(x,y,distance, distance); 
}

Paper Flower
open source
float num = 0;

void setup(){ 
    size(1000, 600);
}

void draw(){ 
    fill(#FEFF03); 
    stroke(#FF0313); 
    background(#FEFF03); 
    strokeWeight(.5); 
    num += 0.04; 
    pushMatrix(); 
    translate(width/2, height/2); 
    rotate(num); 
   
    for(int i = 0; i < 360; i+=20){   
        float x = cos(radians(i))*100;   
        float y = sin(radians(i))*100;       
        pushMatrix();       
        translate(x, y);   
        rotate(num);   
        rect(0, 0, x, y);       
        rotate(num/5);   
        ect(0, 0, x, y);       
        rotate(num/10);   
        rect(0, 0, x, y);   
        popMatrix();  }   
   
        popMatrix();
}              

 
Freestyle
open source
float noiseXoff = 0;
float noiseYoff = 0;  

void setup(){ 
    size(1000,600); 
    background(#FEFF03);
}
 
void draw() { 
    noiseXoff += 0.0316; 
    noiseYoff += 0.0520;    
   
    float x =width*noise(noiseYoff*0.3); 
    float y = height*noise(noiseXoff*0.3); 
    ellipse(x, y, 50, 50); 
    strokeWeight(.5); 
    stroke(#FF0313); 
    fill(#FEFF03);
}
Follow
open source
int num = 40;

void setup(){ 
    size(1000, 600); 
    rectMode(CENTER); 
    strokeWeight(1);


void draw(){ 
    background(#FEFF03); 
    for(int i = 0; i <= num; i++){   
        stroke(#FF0313);   
        fill(#FEFF03);   
        float x = width / 2 + map(mouseX, 0, width, -5, 5) * map(i, 0, num, -num / 2.0, num / 2.0);   
        float y = height / 2 + map(mouseY, 0, width, -5, 5) * map(i, 0, num, -num / 2.0, num / 2.0);   
        ellipse(x, y, 250, 250);  }
}

© 2018 wei