Mountain Stream

back to still page

9A: Your display is now 200 by 200. Emphasize the difference between your early 100 by 100 display area and the now larger 200 by 200 display area with a statically motivated graphic.



#
import math

def stream1 (fat, y1):
 for a in range (0, 200):
  y = 200-a-y1
  x = 200-(int(a/2*math.sin(math.pi/30*a))+y)+int(a/fat)
  g.setPixel(x, y, 100)
def stream2 (y1):
 for a in range (0, 200):
  y = 200-a-y1
  x = 200-(int(a/2*math.sin(math.pi/30*a))+y)
  g.setPixel(x, y, 100)
#stream1 (3, 40)
stream2 ( 40)
stream1 (2, 40)

def mountains():
 g.line(76, 200, 0, 114)
 for a in range (76, 200):
  x = a
  y = 200-abs((int(a/3*math.cos(math.pi/50*a))))
  g.setPixel(x, y, 100)
  
mountains ()