New Media


Vertices
Ellipses
 

show code

float ran1, ran2, ran3, ran4, ran5, ran6;
float rotSpeed = 1.2;
float rotX = 1;
float dir = 1;
int last = 0;
float R, G, B, A;
int posX, posY, posZ;
int reset = 5000;
int startTime = millis();
float rotor = 0;

void setup() {
size(400, 300, WEBGL);
background(34);
stroke(0);
step();
}

void draw() {
//background(34);

translate(width/2, height/2, 0);
randomColor();
rot();
center();
shaper();
}
void rot() {
if (millis() > last) {
rotX = rotX + (rotSpeed * dir);
rotateY(rotX/10);
}
}
void step() {
background(34);
ran1 = random(0, 100);
ran2 = random(0, 100);
ran3 = random(0, 100);
ran4 = random(0, 100);
ran5 = random(0, 100);
//fill(R, G, B, .1);
//posX+=50;
//posY+=50;
}

void center() {
int currentTime = 0;
currentTime = millis() - startTime;
//if (currentTime >= 3000) {
// rotor = 90;
//} if (currentTime >= 6000) {
// rotor = 180;
//} if (currentTime >= 9000) {
// rotor = 270;
//}

if (currentTime >= 3000) {
reset=millis();
background(100);
posX=0;
posY=0;
step();
rotor= random(0, 360);
//reset time
currentTime = 0;
startTime = millis();
}
}

void shaper() {
rotateX(180);
translate(posX, 0, 0);
beginShape();
vertex(ran1, ran3, ran4);
vertex(ran2, ran3, ran4);
vertex(ran5, ran5, ran6);

vertex(ran2, ran3, ran4);
vertex(ran2, ran6, ran4);
vertex(ran5, ran5, ran6);

vertex(ran2, ran6, ran4);
vertex(ran1, ran6, ran4);
vertex(ran5, ran5, ran6);

vertex(ran1, ran6, ran4);
vertex(ran1, ran3, ran4);
vertex(ran5, ran5, ran6);
endShape();
}

void randomColor() {
R = random(100, 255);
G = random(100, 255);
B = random(100, 255);
A = .1;
}

Sculpture


Electronic
Ceramics

Other


Painting / Drawing
Photo Manipulation