Exemplo n.º 1
0
 def length(self):
     "total worm length"
     l = 0.0
     for i, p1 in enumerate(self.points[:-1]):
         p2 = self.points[i+1]
         l += util._dist_line(p1, p2)
     return l
Exemplo n.º 2
0
 def length(self):
     "total worm length"
     l = 0.0
     for i, p1 in enumerate(self.points[:-1]):
         p2 = self.points[i + 1]
         l += util._dist_line(p1, p2)
     return l
Exemplo n.º 3
0
 def tail_length(self):
     "return the length of the tail segment"
     p1, p2 = self.tail_segment
     return util._dist_line(p1, p2)
Exemplo n.º 4
0
 def tail_len(self):
     "length of tail line (could be the whole worm too"
     return util._dist_line(self.points[0], self.points[1])
Exemplo n.º 5
0
 def tail_length(self):
     "return the length of the tail segment"
     p1, p2 = self.tail_segment
     return util._dist_line(p1, p2)
Exemplo n.º 6
0
 def tail_len(self):
     "length of tail line (could be the whole worm too"
     return util._dist_line(self.points[0], self.points[1])