-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
66 lines (46 loc) · 2.59 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Boid Flocking Behaviour
This program is an implementation of a boid flocking behaviour simulation.
Features include basic boid rules (alignment, cohersion, separation), obstacle
avoidance, and food sources.
The implementation is written in Lua and uses the LOVE framework (http://love2d.org).
Description of Important Files:
objects/boid.lua
- Routines for updating orientation and position of a single boid
objects/boid_graphic.lua
- Routines for handling drawing of the boid triangle graphic.
objects/seeker.lua
- A point that steers towards a target. Based on Craig Reynold's
steering behaviour (http://www.red3d.com/cwr/steer/). Used to help
boids steer towards a target.
objects/flock.lua
- Manages a flock of boids. Handles adding and removing boids, flockmate
queries, and boid graphics.
objects/flock_interface.lua
- A user interface to the flock object. Handles mouse input for selection
of boids and setting a boid's waypoint.
objects/boid_emitter.lua
- spawns boids at a specified rate. Boids are spawned within a specified
radius of a point on a plane.
objects/boid_food_source.lua
- Manages multiple food resources and their depletion. Handles updates to
the polygonizer and field functions as boids "eat" the resources.
objects/implicit_point.lua
- primitive for the field function of a point
objects/implicit_line.lua
- primitive for the field function of a line
objects/implicit_rectangle.lua
- primitive for the field function of a rectangle
objects/implicit_primitive_set.lua
- manages a set of primitives. Handles adding/removing primitives and
evaluating field functions using either basic summation or Ricci blend.
objects/polygonizer.lua
- A 2d implicit surface polygonizer. Handles polygonization of a set of
primitives. Uses continuation algorithm to find boudary of surface.
Constructs polygonized data for use with collisions and graphics drawing.
objects/collider.lua
- A fixed grid spatial partition. Handles insertion/deletion/updates of
points and axis-aligned bounding boxes. Used for querying boids in a flock
and primitives for the polygonizer.
states/*
- Directory contains all states of the program (slides and interactive
demos). Each state contains load, update, draw and user input callbacks.