/** * Parameterize: Spacesuit. * Original design by Hermann Oberth in 1923. * A simple exercise in positioning lines, vertexes and ellipses. * by Henk Lamers * Loftmatic, November 10, 2011. * * Code written for Processing 1.5.1 * Get Processing at http://www.processing.org/download */ int x = 350; // X-Location on the screen. int y = 350; // Y-Location on the screen. int radius = 40; // Radius for joints / gastanks. // Gray-tones for coloring the spacesuit. color gray_One = color (240); // Lightest gray. color gray_Two = color (220); color gray_Three = color (200); color gray_Four = color (170); color gray_Five = color (127); color gray_Six = color (63); // Darkest gray. size (705, 705); smooth (); background (0); noStroke (); rectMode (CENTER); ellipseMode (CENTER); // scale (0.5); // Right leg. fill (gray_Four); rect (x - 38, y + 200, x - 318, y - 252); rect (x - 38, y + 260, x - 320, y - 310); rect (x - 38, y + 290, x - 324, y - 310); fill (gray_Three); ellipse (x - 38, y + 220, radius, radius); // Right Foot. fill (gray_Five); rect (x - 70, y + 326, x - 335, y - 343); // Magnets for grip. rect (x - 40, y + 326, x - 335, y - 343); fill (gray_Four); beginShape (); vertex (x - 88, y + 320); vertex (x - 25, y + 290); vertex (x - 25, y + 326); vertex (x - 88, y + 326); endShape (CLOSE); noFill (); stroke (gray_Five); strokeWeight (4); arc (x - 136, y + 322, x - 335, y - 340, radians (x - 170), radians (y + 10)); // Top hook. arc (x - 130, y + 324, x - 338, y - 340, radians (x - x), radians (y - 170)); // Bottom hook. noStroke (); fill (gray_Three); ellipse (x - 38, y + 310, radius - 8, radius - 8); // Mysterious Object. noFill (); strokeWeight (x - 342); stroke (gray_Three); strokeCap (PROJECT); arc (x - 205, y + 10, x - 320, y - 50, radians (x - 80), radians (y + 100)); strokeCap (ROUND); noStroke (); // Glove. fill (gray_Five); quad (x - 190, y + 20, x - 160, y + 20, x - 160, y + 40, x - 190, y + 50); // Hand palm. fill (gray_Two); rect (x - 190, y + 25, x - 336, y - 250); stroke (gray_Five); strokeWeight (x - 344); line (x - 192, y + 20, x - 150, y + 20); // Thumb. line (x - 202, y + 27, x - 190, y + 27); // Fingers. line (x - 202, y + 34, x - 190, y + 34); line (x - 202, y + 41, x - 190, y + 41); line (x - 202, y + 48, x - 190, y + 48); noStroke (); // Left arm. fill (x - 180); rect (x - 126, y + 28, x - 326, y - 320); rect (x - 150, y + 28, x - 326, y - 324); // Main body. fill (gray_Five); ellipse (x - 59, y - 5, x - 230, y - 285); // Top. rect (x - 59, y + 68, x - 230, y - 205); // Middle body. ellipse (x - 59, y + 133, radius * 3, radius * 3); // Bottom :) // Left leg. fill (gray_Two); rect (x - 80, y + 200, x - 316, y - 250); fill (gray_One); ellipse (x - 80, y + 220, radius, radius); fill (gray_Two); rect (x - 80, y + 260, x - 320, y - 310); rect (x - 80, y + 290, x - 324, y - 310); // Left Foot. fill (gray_Five); rect (x - 110, y + 326, x - 335, y - 343); // Magnets for grip. rect (x - 80, y + 326, x - 335, y - 343); fill (gray_Two); beginShape (); vertex (x - 130, y + 320); vertex (x - 67, y + 290); vertex (x - 67, y + 326); vertex (x - 130, y + 326); endShape (CLOSE); fill (gray_One); ellipse (x - 80, y + 310, radius - 8, radius - 8); // Main body additionals. fill (gray_One); ellipse (291, 500, 85, 85); // Hip. fill (gray_Six); ellipse (x - 30, y + 96, (radius + 2) / 7, (radius + 2) / 7); // Telephone connection. beginShape (); // Switch panel. vertex (x - 128, y + 66); vertex (x - 119, y + 60); vertex (x - 119, y + 100); vertex (x - 128, y + 93); endShape (CLOSE); rect (x - 117, y + 15, x - 345, y - 310); // Aditional window. // Head. stroke (gray_Five); strokeWeight (x - 347); line (x - 20, 136, x - 20, y - 60); // Antenna. noStroke (); fill (gray_Six); rect (x - 58, y - 58, x - 270, y - 310); // Window pane. fill (gray_Three); ellipse (x - 88, y - 70, x - 345, y - 340); // Driving mirror. fill (gray_Five); ellipse (x - 59, y - 88, x - 259, y -330); // Entry level. fill (gray_Three); rect (x - 59, y - 82, x - 258, y - 336); // Top head. rect (x - 70, y - 60, x - 338, y - 300); // Left window frame. rect (x - 19, y - 60, x - 338, y - 300); // Right window frame. rect (x - 58, y - 35, x - 260, y - 340); // Top head. fill (gray_Five); rect (x- 58, y - 30, x - 250, y - 345); // Sealing ring. // Tanks for compresssed air, oxygen and steering-rocket-fuel. fill (gray_Two); ellipse (x + 4, y, radius - 10, radius - 10); // Top left cylinder. rect (x + 4, y + 55, x - 320, y - 240); // Middle left cylinder. ellipse (x + 4, y + 110, radius - 10, radius - 10); // Bottom left cylinder. ellipse (x + 34, y, radius - 10, radius - 10); // Top right cylinder. rect (x + 34, y + 55, x - 320, y - 240); // Middle right cylinder. ellipse (x + 34, y + 110, radius - 10, radius - 10); // Bottom right cylinder. // Steer rocket. fill (gray_Five); beginShape (); // Nozzle vertex (x + 110, y + 96); vertex (x + 155, y + 92); vertex (x + 155, y + 107); vertex (x + 110, y + 104); endShape (CLOSE); fill (gray_Six); ellipse (x + 110, y + 100, radius / 2 - 5, radius / 2 - 5); // Left circle. // Heat-discharge. stroke (gray_Five); strokeWeight (x - 346); line (x + 72, y - 15, x + 72, y - 165); // Left tube. line (x + 88, y - 15, x + 88, y - 165); // Right tube. noStroke (); ellipse (x + 80, y - 15, radius / 2 + 5, radius / 2 + 5); // Lower pivot point. ellipse (x + 80, y - 165, radius / 2 + 5, radius / 2 + 5); // Upper pivot point. pushMatrix (); // The total top thing. translate (x + 150, y - 252); rotate (radians (radius)); arc (x - x, y - y, x - 200, y - 150, radians (x - x), radians (y - 170)); fill (gray_Three); noStroke (); arc (x - x, y - y, x - 200, y - 250, radians (x - x), radians (y + 10)); popMatrix (); stroke (gray_Three); strokeWeight (x - 348); line (x + 48, y + 122, x + 200, y + 260); // Hook with line. // Additional gas tank. fill (gray_Three); rect (x + 76, y + 55, x - 295, y - 215); // Right arm. noStroke (); pushMatrix (); translate (x - 60, y + 6); rotate (radians (x - 322)); fill (gray_Two); rect (x - x, y - 330, x - 315, y - 310); rect (x - x, y - 280, x - 320, y - 260); rect (x - x, y - 230, x - 325, y - 325); rect (x - x, y - 190, x - 328, y - 290); fill (gray_One); ellipse (x - x, y - y, radius + 10, radius + 10); ellipse (x - x, y - 275, radius, radius); stroke (gray_Five); // Grip. strokeWeight (x - 346); noFill (); line (x - x, y - 160, x - x, y - 120); arc (x - x, y - 111, x - 340, y - 334, radians (x - 260), radians (y - 70)); // Top grip. arc (x - x, y - 118, x - 342, y - 336, radians (x - 80), radians (y + 90)); // Bottom grip. noStroke (); fill (gray_Five); ellipse (x - x, y - 150, radius / 4, radius / 4); fill (gray_One); ellipse (x - x, y - 165, radius - 10, radius - 10); popMatrix ();