Code Monkey home page Code Monkey logo

boids's Introduction

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.
     
      
      

boids's People

Contributors

rlguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.