Interactive Authoring #2

MovingShapesFinal from Shelby Derck on Vimeo. (500×500)

Program:

float triX=0;
float triY=0;
float quadX=250;
float quadY=250;
float t=20;
float o=10;
float f=5;
float th=30;
float c;
float a;
float r=250;
float R=255;
float fit=50;
float T=2;
float rr=500;
float z=0;

void setup(){
size(500,500);
loop();
}
void draw(){
background (R);
//Triangle
c=random(R);
a=random(R);
fill(c,a,t);
triangle (triX,triY,triX-th-th,triY-th-o,triY-th-o,triX-th-th);
triX= triX+f;
triY=triY+f;

//Quad
quad(quadX-fit,quadY, quadX+fit,quadY,quadX-fit,quadY+fit,quadX+fit,quadY+fit);
quadX=quadX-f;
quadY=quadY-f;

//ellipse
ellipse(c*T,a*T,c,a);
//rectangle
rect(a+T,c+T,a,c);
//line
line(z,rr,r+r,rr);
rr=rr-o;

if (triX>r+r){
triX=triX-triX;
triY=triY-triY;

}
if (quadX<z){
quadX=r+r;
quadY=r+r;
}
if (rr<z){
rr=r+r;
}
}

Advertisements

About dercks

Shelby is a student at Alfred State College in Digital Media and Animation.
This entry was posted in Interactive Authoring and tagged , . Bookmark the permalink.

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