#for i in range (3):
#
for j in range(3):
#
use i,j to find center
# Program to make snowflake!
# Local graphics module. Must be in same folder as this
# program (or both on Desktop)
import ecs10graphics as gr
# Math module that comes with Python
import math
import random as random
def pointOnCircle(f, r):
# f is fraction of the way around
# r is radius
# produces a point f way around circle c,r
# Use the global variable "center".
c = center
a = (2*math.pi)*f + math.pi/2.0
x = c[0] + math.cos(a)*r
y = c[1] + math.sin(a)*r
return [x,y]
def circleSegment(f1, f2, r1, r2):
# f1 is first fraction, r1 first radius
# f2 is second fraction, r2 second radius
# draws a segment from point f1, r1 to point f2, r2
p1 = pointOnCircle(f1, r1)
p2 = pointOnCircle(f2, r2)
gr.line(p1[0], p1[1], p2[0], p2[1], lineWidth=3)
def drawBothLines(frac,s1, s2, r1, r2):
circleSegment(frac+s1, frac+s2, r1, r2)
circleSegment(frac-s1, frac-s2, r1, r2)
#call by: drawBothLines(frac, .05, .05, 100)
def snowman():
gr.set_Color(gr.Color.white)