Class 40 — November 29

Color within the lines


Look both ways


Agenda


Selfie

self-portrait       self-portrait


Redownload one more time


Download


Downloads to test function flood()


Downloads to test function sweep()


Flooding visualization


Function flood( drawing, spot, c, bg=(255,255,255) )

 If the spot on the drawing is not empty

  return

 Color the spot using c

 Create a to-do list with spot as its element

 While the to-do list is not empty

  Pop an element from the to-do list and assign it to v

  If v’s left is empty, paint it and add to to-do list

  If v’s right is empty, paint it and add to to-do list

  If v’s above is empty, paint it and add to to-do list

  If v’s below is empty, paint it and add to to-do list


Function sweep( drawing, bg=(255,255,255) )


Coloring by va.py


usa         va


Coloring by usa.py


usa         usa


Coloring by uva.py


uva logo         uva logo


Coloring by book.py


trex         trex


mandala         mandala


flower         flower


girl and dog         girl and dog


Coloring by street-art.py


graffiti         graffiti


graffiti         graffiti


graffiti         graffiti


graffiti         graffiti


graffiti         graffiti