xxxxxxxxxx
65
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
colorMode(HSB, 360, 100, 100);
angleMode(DEGREES);
}
function draw() {
background(0);
orbitControl();
ambientLight(0, 0, 100);
pointLight(0, 0, 50, -width, -height, 10);
push();
// noStroke()
rotateX(90);
rotateZ(90);
cylinder(height / 2, width * 2);
translate(0, (-width / 6) * 7);
cone(height / 2, -width / 3);
translate(0, width / 6);
rotateX(90);
torus(height / 2, height / 32);
rotateY(90);
translate((width / 6) * 16, (height / 8) * 4);
box(width * 1.5, height * 2, height);
translate((-width / 6) * 8, (-height / 4) * 3);
box(width * 2, (height / 4) * 3, width / 2);
rotateZ(90);
rotateX(90);
strokeWeight(5);
stroke(3);
translate(-width / 3, 0, (-width / 8) * 3);
cylinder((width / 16) * 5, height);
translate(0, 0, (width / 16) * 11);
cylinder((width / 16) * 5, height);
translate((-width / 32) * 3, 0, (width / 16) * 9);
cylinder((width / 32) * 7, height);
translate(0, 0, (width / 32) * 15);
cylinder((width / 32) * 7, height);
translate(0, 0, (width / 32) * 15);
cylinder((width / 32) * 7, height);
translate(0, 0, (-width / 4) * 11);
cylinder((width / 32) * 7, height);
translate((height / 16) * 5, 0, 0);
box(height / 8, width, width / 2);
pop();
push();
translate(0, -width / 4, 0);
cone(height / 4, width);
translate(0, -width / 2, 0);
ellipsoid(height / 4, height / 12);
translate(-width / 2, width / 2, 0);
cylinder((height / 16) * 3, width / 2);
pop();
push();
rotateZ(90);
translate((height / 16) * 5, (-height / 16) * 13, (height / 16) * 9);
cylinder(height / 8, width / 2);
pop();
push();
rotateZ(90);
translate((height / 16) * 7, (height / 16) * 7, (height / 16) * 9);
cylinder(height / 32, width);
pop();
}