Cube Number 8

Rupert Russell

Ballarat, Australia

  • Available
    Products
    55
  • Artist
    Notes

Apparel

Cases & Skins

Wall Art

Home Decor

Accessories

Stationery

Artist's Description

int cubeSide = 450;
int cornerSize = 190;

void setup() {
size(900, 900);
background(0);
}

void draw() {
noLoop();
noFill();
strokeCap(MITER);

// Translate the the center of the screen

translate(width /2, height /2);
// ellipse(0, 0, 5, 5);
noStroke();

fill(180, 180, 180);
// front top left
pushMatrix();
translate(cubeSide * -3/4, cubeSide * – 1/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// front bottom left

pushMatrix();
translate(cubeSide * -3/4, cubeSide * + 3/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// fromt bottom right

pushMatrix();
translate(cubeSide * 1/4, cubeSide * + 3/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// fromt top right

pushMatrix();
translate(cubeSide * 1/4, cubeSide * – 1/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// back bottom left

pushMatrix();
translate(cubeSide * -1/4, cubeSide * 1/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// back bottom left?

pushMatrix();
translate(cubeSide * – 1/4, cubeSide * 1/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// back top left

pushMatrix();
translate(cubeSide * – 1/4, cubeSide * – 3/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// back top rght

pushMatrix();
translate(cubeSide * 3/4, cubeSide * – 3/4);
ellipse(0, 0, cornerSize, cornerSize);
popMatrix();

// back bottom right

pushMatrix();
translate(cubeSide * 3/4, cubeSide * 1/4);
ellipse(0, 0, cornerSize, cornerSize);

popMatrix();
stroke(0);
strokeWeight(40);

stroke(0);
strokeJoin(ROUND);

noFill();
beginShape();
vertex(cubeSide * -3/4, cubeSide * -1/4);
vertex(cubeSide * 1/4, cubeSide / -1/4);
vertex(cubeSide * 1/4, cubeSide * 3/4);
vertex(cubeSide * -3/4, cubeSide * 3/4 );
vertex(cubeSide * -3/4, cubeSide * -1/4 );
vertex(cubeSide * 1/4, cubeSide / -1/4);
endShape();

beginShape();
vertex(cubeSide * – 1/4, cubeSide * 1/4);
vertex(cubeSide * – 1/4, cubeSide * – 3/4);
vertex(cubeSide * 3/4, cubeSide * – 3/4);
vertex(cubeSide * 3/4, cubeSide * 1/4);
vertex(cubeSide * – 1/4, cubeSide * 1/4);
vertex(cubeSide * -3/4, cubeSide * 3/4);
vertex(cubeSide * -3/4, cubeSide * -1/4);
vertex(cubeSide * -1/4, cubeSide * -3/4);
vertex(cubeSide * 3/4, cubeSide * -3/4);
vertex(cubeSide * 1/4, cubeSide * -1/4);
vertex(cubeSide * 1/4, cubeSide * 3/4);
vertex(cubeSide * 3/4, cubeSide * 1/4);
endShape();

save(“cube-8.png”);
exit();

}

desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait
desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait