Example #1
0
File: boid.py Project: tomdml/boids
 def get_arrow_points(self):
     front = self.pos + Vector2D.from_scalars(self.vel.direction, 10)
     left = self.pos + Vector2D.from_scalars(self.vel.direction + (5 / 4 * math.pi), 5)
     right = self.pos + Vector2D.from_scalars(self.vel.direction + (-5 / 4 * math.pi), 5)
     return (front, left, self.pos, right)
Example #2
0
File: boid.py Project: tomdml/boids
 def get_fov_line_points(self):
     left = self.pos + Vector2D.from_scalars(self.vel.direction + (math.radians(Config.FOV / 2)), Config.VIEW_RADIUS)
     right = self.pos + Vector2D.from_scalars(self.vel.direction - (math.radians(Config.FOV / 2)), Config.VIEW_RADIUS)
     return (left, self.pos, right)
Example #3
0
File: boid.py Project: tomdml/boids
 def get_line_points(self):
     front = self.pos + Vector2D.from_scalars(self.vel.direction, 20)
     return (front, self.pos)