示例#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
示例#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
示例#3
0
 def tail_length(self):
     "return the length of the tail segment"
     p1, p2 = self.tail_segment
     return util._dist_line(p1, p2)
示例#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])
示例#5
0
 def tail_length(self):
     "return the length of the tail segment"
     p1, p2 = self.tail_segment
     return util._dist_line(p1, p2)
示例#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])