/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://mhmscc.sketchpad.cc/sp/pad/view/ro.3GMLJDt2R4n/rev.446
*
* authors:
* Steven Dollins
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// Pressing Control-R will render this sketch.
void setup() {
// canvas size (Variable aren't evaluated. Integers only, please.)
size(400, 300);
background(0);
// smooth edges
smooth();
// limit the number of frames per second
frameRate(30);
colorMode( HSB, 360, 100, 100, 100 );
}
void drawShip() {
noStroke();
// body
fill( 30, 80, 80 );
triangle( 12, 0, -3, -2, -3, 2 );
// wings
fill( 60, 90, 90 );
triangle( 12, 0, -3, -2, -8, -8 );
triangle( 12, 0, -3, 2, -8, 8 );
// tail
fill( 160, 90, 90 );
triangle( 0, 0, -6, -2, -6, 2 );
}
void draw() {
// clear the background
noStroke();
fill(0, 64);
rect(0, 0, width, height);
pushMatrix();
translate( width/2, height/2 );
scale( 4 );
rotate( millis()/1000 );
drawShip();
popMatrix();
}