Skip to content

Instantly share code, notes, and snippets.

@ramalho
Created October 22, 2017 16:45
Show Gist options
  • Select an option

  • Save ramalho/e56ac0c0454540cf259c316a567ad188 to your computer and use it in GitHub Desktop.

Select an option

Save ramalho/e56ac0c0454540cf259c316a567ad188 to your computer and use it in GitHub Desktop.
Brazilian flag (simple)
stroke 0
# Start by drawing a green background.
background "#009b3a"
# We'll draw the yellow diamond as two triangles: a top, and a bottom.
color "#fedf00"
move -200
polygon 0, 0, 200, -130, 400, 0 # Top Half
polygon 0, 0, 200, 130, 400, 0 # Bottom Half
# A big blue circle for the middle.
move 200
color "#002776"
circle 80
# We can use an ARC to make the curved white line
move -33, 108
color null # Null means no colour
stroke 14, white
arc 138,-0.2,1.4
# There's a lot of messy lines over our circle - let's use a MASK to hide them!
stroke 15, "#fedf00"
moveTo 250,250
circle 80
# You just coded the Brazilian Flag!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment