User:Mihail Bakalov/Trimester 1/NETWORK BASED PROTOTYPING/AstralDataProject

From XPUB & Lens-Based wiki
< User:Mihail Bakalov‎ | Trimester 1‎ | NETWORK BASED PROTOTYPING
Revision as of 16:43, 15 January 2014 by Mihail Bakalov (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<script>

import csv import turtle t = [] r = csv.DictReader(open("asas.csv")) counter=0 f = [] for row in r:

   if row.get("Class") == "Mira":

t.append(int(float(row.get("DEC"))))

print t[0]


d = t[counter]-t[counter-1] g = t[counter] gg = t[counter-1] for value in t: if counter == 0: if g > 0 and g < gg and d > 0: turtle.fd(10) turtle.rt(t[counter]) elif g > 0 and g < gg and d < 0: turtle.fd(10) turtle.lt(t[counter]) elif g > 0 and g > gg: turtle.fd(10) turtle.lt(t[counter]) elif g < 0 and g > gg: turtle.fd(10) turtle.rt(t[counter]) else: turtle.fd(10) turtle.rt(t[counter])

#turtle.fd(10) #turtle.lt(t[counter]) else: if g > 0 and g < gg and d > 0: turtle.fd(10) turtle.lt(t[counter]) elif g > 0 and g < gg and d < 0: turtle.fd(10) turtle.rt(t[counter]) elif g > 0 and g > gg: turtle.fd(10) turtle.lt(t[counter]) elif g < 0 and g > gg: turtle.rd(10) turtle.lt(t[counter]) else: turtle.fd(10) turtle.lt(t[counter])

counter+=1


</script>