mas110 exhibition .fundamentals of computational media design.spring 2000.professor john maeda
megan's static pieces . megan's dynamic pieces

 
# the three words i am linking for this piece are
# select, messy, and exciting
# the two bottles allow you to select between an exciting 
# piece, or a messy piece
# you can navigate through the whole piece by clicking on
# bottles, to move between the different scenes

g.norefresh()

scene = 1

while 1:

 m1 = g.getMouse(1)
 m2 = g.getMouse(2)
 m3 = g.getMouse(3)
  
 # selection
 if (scene == 1):
  g.refresh()
  g.paper(0)
  g.pen(50)

  if ((m1 < 50) and (m1 > 20) and (m2 > 15) and (m2 < 50)):
 
   g.paper(0)
   g.pen(50)

   # the counter
   g.field(0, 0, 100, 20, 40)
   g.field(0, 0, 100, 9, 50)

   # bottle 1
   g.field(20, 15, 50, 50, 60)
   g.field(22, 51, 48, 55, 80)
   g.field(33, 56, 38, 57, 80)
   g.pen(70)
   g.line(22, 25, 22, 45)
   g.line(24, 52, 24, 54)

   # bottle 2
   g.pen(50)
   g.field(60, 15, 80, 70, 60)
   g.field(61, 71, 79, 74, 80)
   g.field(68, 75, 73, 76, 80)
   g.line(62, 40, 62, 65)
   g.line(63, 72, 63, 73) 
 
   if (m3 == 100):
    scene = 2
    g.paper(90)

  elif ((m1 < 85) and (m1 > 60) and (m2 < 70) and (m2 > 15)):

   g.paper(0)
   g.pen(50)

   # the counter
   g.field(0, 0, 100, 20, 40)
   g.field(0, 0, 100, 9, 50) 

   # bottle 1
   g.field(20, 15, 50, 50, 70)
   g.field(22, 51, 48, 55, 100)
   g.field(33, 56, 38, 57, 100)
   g.line(22, 25, 22, 45)
   g.line(24, 52, 24, 54)

   # bottle 2
   g.field(60, 15, 80, 70, 50)
   g.field(61, 71, 79, 74, 70)
   g.field(68, 75, 73, 76, 70)
   g.pen(60)
   g.line(62, 40, 62, 65)
   g.line(63, 72, 63, 73)

   if (m3 == 100):
    scene = 3
      
  else:

   g.paper(0)
   g.pen(50)
      
   # the counter
   g.field(0, 0, 100, 20, 40)
   g.field(0, 0, 100, 9, 50)

   # bottle 1
   g.field(20, 15, 50, 50, 70)
   g.field(22, 51, 48, 55, 100)
   g.field(33, 56, 38, 57, 100)
   g.line(22, 25, 22, 45)
   g.line(24, 52, 24, 54)

   # bottle 2
   g.field(60, 15, 80, 70, 60)
   g.field(61, 71, 79, 74, 80)
   g.field(68, 75, 73, 76, 80)
   g.line(62, 40, 62, 65)
   g.line(63, 72, 63, 73)
 
 # messy
 if (scene == 2):

  g.field(0, 0, 100, 10, 40)   

  # mini bottle icon
  g.field(5, 5, 13, 15, 55)
  g.field(6, 16, 12, 17, 65)
  g.pen(30)
  g.line(6, 9, 6, 13)

  # time to make a mess
  g.pen(40)
  g.setPixel(m1, m2, 40)
  g.setPixel(80-m1, m2+20, 60)
  g.setPixel(m1+20, 80-m2, 20)
  g.refresh()
  
  # to get back to the first scene, click on the little bottle
  if ((m1 < 12) and (m1 > 5) and (m2 < 20) and (m2 > 5)):
   if (m3 == 100):
    scene = 1
    
 # exciting
 if (scene == 3):
  for i in range(0, 70):
   count = i
   g.paper(20)

   g.field(70-count, 5+2*count, 71-count, 6+2*count, 60)
   g.field(40+count, 5+3*count, 41+count, 6+3*count, 80)
   g.field(50+count, 5+count, 51+count, 6+count, 100)
   g.field(50-count, 5+2*count, 51-count, 6+2*count, 90)
   g.field(60+count, 5+2*count, 61+count, 6+2*count, 80)
   g.field(60-count, 5+3*count, 61-count, 6+3*count, 60)
   g.field(30+count, 5+3*count, 31+count, 6+3*count, 80)
   g.field(60-count, 5+count, 61-count, 6+count, 100)
   g.field(30, 2*count, 31, 1+2*count, 100)
   g.field(55, 3*count, 56, 1+3*count, 80)
   g.field(80, count, 81, 1+count, 70)
   
   g.field(0, 0, 100, 10, 40)  
   # mini bottle icon
   g.field(5, 5, 12, 18, 60)
   g.field(6, 19, 11, 20, 80)
   g.pen(40)
   g.line(6, 10, 6, 16)

   g.refresh()
   
  # to get back to the first scene, click on the little bottle
   if ((m1 < 12) and (m1 > 5) and (m2 < 20) and (m2 > 5)):
    scene = 1
    if (m3 == 100):
     scene = 1