Commit b0d4cd9b authored by Arman's avatar Arman
Browse files

spiral

parent 9eb78b61
......@@ -22,12 +22,13 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
if e.target == self.observechannel:
#this change the precision of the circle
NbUsers = len(self.channels[e.target].users())
rng=randint(1,7)
rng=randint(1,6)
#rng=1+(randint(0,100) * .01)
angle=360/(NbUsers/rng)
#choose a random position
pX=randint(-24050,24050)
pY=randint(-17975,17975)
#radius = 5000
if e.target == self.observechannel:
msg = e.arguments[0]
#this count the length of a message and draws a circle accordingly
......@@ -38,6 +39,7 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
#c.privmsg(self.plotchannel,str(todo))
NbWords = len(msg.split())
d=50
#cl=spiral(pX - radius,pY - radius,pX + radius,pY + radius,30,NbWords,angle)
for x in range(0,NbWords):
cl='PA'+str(pX)+','+str(pY)+';CI{0}'.format((d*x)+d)+','+str(angle)
print cl
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment