submission by SSample for Flag (View the other submissions)
function setup(){
  var myCanvas = createCanvas(windowWidth,windowHeight); //you must keep this line unmodified
}

function draw() {
  //start writing your code here

  var black = color(0, 0, 0)
  var dark_gray = color(75, 75, 75)
  var gray = color(128, 128, 128)
  var red = color(255, 0, 0)
  var green = color(0, 255, 75)
  var blue = color(0, 0, 255)
  var brown = color(121, 63, 13)
  var white = color(255, 255, 255)  // variables

  background(black)  // space

  fill(white)
  stroke(white) 

  strokeWeight(random(20))
  stroke(random(255), random(255), random(255))
  point(random(800), random(800))  // stars
 
  strokeWeight(1)
  stroke(blue)
  fill(blue)
  ellipse(400, 0, 190, 190)
  stroke(green)
  fill(green)
  ellipse(400, 0, 60, 120)
  ellipse(420, -20, 110, 50)  // earth

  stroke(gray)
  fill(gray)
  ellipse(400, 820, 700, 250)
  stroke(black)
  fill(dark_gray)
  ellipse(350, 760, 200, 100)  // moon

  fill(brown)
  rect(400, 570, 10, 129)  // flagpole

  fill(red)
  rect(400, 440, 210, 130)
  fill(blue)
  rect(400, 440, 90, 70)
  fill(white)
  rect(490, 450, 120, 10)
  rect(490, 470, 120, 10)
  rect(490, 490, 120, 10)
  rect(400, 510, 210, 10)
  rect(400, 530, 210, 10)
  rect(400, 550, 210, 10)
}