summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Weber <timm.weber@me.com>2015-08-08 03:18:53 +0200
committerTimm Weber <timm.weber@me.com>2015-08-08 03:18:53 +0200
commitc107ef76179876916d6e5db802776afa73f56b77 (patch)
treeeb31de8e587a6cdfab09f1b49edd8a4abca92e5b
parent0a8e508163c6ff73b46bf57438645ac4e1663754 (diff)
viren jetzt neu in gefixt
-rw-r--r--test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.py b/test.py
index 32d75de..99b00f8 100644
--- a/test.py
+++ b/test.py
@@ -69,7 +69,7 @@ class MeinSubskribierer:
print("debug line")
def generateVirus(spikes, spike_length, radius, global_coords):
- step = 2*math.pi / spikes*2
+ step = (2*math.pi) / (spikes*2)
points = []
for i in range(spikes*2):
@@ -94,11 +94,11 @@ def drawCell(cell):
color = (0,255,0)
color2 = (100,255,0)
radius = int(cell.size/2)
- polygon = generateVirus(100, 5, radius, (cx, cy))
+ polygon = generateVirus(int(radius*0.6), 5, radius, (cx, cy))
+ gfxdraw.filled_polygon(screen, polygon, color2)
gfxdraw.aapolygon(screen, polygon, color)
gfxdraw.polygon(screen, polygon, color)
- #gfxdraw.filled_polygon(screen, polygon, (0,0,0))
else:
color=(int(cell.color[0]*255), int(cell.color[1]*255), int(cell.color[2]*255))