-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate7mc.py
77 lines (42 loc) · 1.18 KB
/
generate7mc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from snowflake import plotPoints as draw, rotatePetal, growFlake, create3dPrintFile
points = []
points.append( (2,-1) )
points.append( (3,0) )
points.append( (3,5) )
points.append( (7,4) )
points.append( (7,5.5) )
points.append( (3,5.5) )
points.append( (3,7) )
points.append( (5,8) )
points.append( (3,9) )
points.append( (3,10.5) )
points.append( (7,10.5) )
points.append( (7,12) )
points.append( (4,12) )
points.append( (3,13) )
points.append( (3,15.5) )
points.append( (5,15.5) )
points.append( (5,13.5) )
points.append( (6,13.5) )
points.append( (7,14) )
points.append( (7,15.5) )
points.append( (8,15.5) )
points.append( (8,9) )
points.append( (6,9) )
points.append( (7,8) )
points.append( (6,7) )
points.append( (8,7) )
points.append( (8,2) )
points.append( (5,3) )
points.append( (5,0) )
points.append( (6,-1) )
points.append( (2,-1) )
draw(points)
snowflakePetal = growFlake(points, maxDepth=3, numChildren=4, angleBetweenSiblings=40, scalar=0.5)
draw(snowflakePetal)
# generate
fullSnowflake = []
for i in range(0, 6):
fullSnowflake += rotatePetal(snowflakePetal, pivot=(0,0), angle=(360/6) * i)
draw(fullSnowflake)
create3dPrintFile(fullSnowflake, 'testy')