Code Monkey home page Code Monkey logo

flockingbird's Introduction

flockingbird

A header-only c++ library for creating 2D flocking animations. http://www.cs.toronto.edu/~dt/siggraph97-course/cwr87/

demo500

The algorithm uses kD-Trees to calculate the neighbors of a boid, making it possible to simulate more than a thousand boids (depending on framerate, compiler optimization level, and processor speed).

Please use the highest optimization level if you compile the library yourself. 500 boids is already difficult with the default optimization, whereas with -O3 you can easiliy run a 1000 boid simulation.

setup

(I don't have a windows PC, so just for mac)

brew install cmake
brew install llvm
brew install clang-format # for working on the project/formatting

Dependencies

For the demo animation:

brew install cairo
brew install gtk+3

NOTE: i had to

export LDFLAGS="-L/usr/local/Cellar/cairo/1.16.0_5/lib $LDFLAGS"

build

cd build
cmake ..
make && make install

build and test

./test.sh

run demo

./build/flockingbird_demo

emacs integration

make sure that compile_commands is linked to the root

ln build/compile_commands.json .

Credits/Disclaimer

Resources used for development

Bindings

  • Swift (Work in progress)

flockingbird's People

Contributors

falcowinkler avatar tobiasryttlinger avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wangtaoyijiu

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.