projects
/
tabakrolletjie.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Document windows 7 permissions workaround
[tabakrolletjie.git]
/
misc
/
hexagon.py
1
import json
2
3
import pymunk
4
5
r = 20
6
radial = pymunk.Vec2d(r, 0)
7
centre = pymunk.Vec2d(512, 352)
8
9
vertices = []
10
for d in range(0, 360, 60):
11
vertices.append(centre + radial.rotated_degrees(d))
12
13
print json.dumps([[int(round(v.x)), int(round(v.y))] for v in vertices])