{"id":18903941,"url":"https://github.com/falcowinkler/flockingbird","last_synced_at":"2025-04-15T03:47:55.564Z","repository":{"id":123619769,"uuid":"332853261","full_name":"falcowinkler/flockingbird","owner":"falcowinkler","description":"Flocking algorithm implementation in c++","archived":false,"fork":false,"pushed_at":"2023-10-12T13:49:47.000Z","size":6460,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T03:47:49.902Z","etag":null,"topics":["boids","boids-algorithm","boids-behaviour","boids-simulation","cpp","cpp11","emergence","flocking","header-only","modelling-biological-systems","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/falcowinkler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-25T19:04:30.000Z","updated_at":"2025-01-28T15:23:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"4dc4bf0d-9a11-4823-a6d0-a5a87333d277","html_url":"https://github.com/falcowinkler/flockingbird","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcowinkler%2Fflockingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcowinkler%2Fflockingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcowinkler%2Fflockingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcowinkler%2Fflockingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falcowinkler","download_url":"https://codeload.github.com/falcowinkler/flockingbird/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003941,"owners_count":21196794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boids","boids-algorithm","boids-behaviour","boids-simulation","cpp","cpp11","emergence","flocking","header-only","modelling-biological-systems","simulation"],"created_at":"2024-11-08T09:06:55.191Z","updated_at":"2025-04-15T03:47:55.548Z","avatar_url":"https://github.com/falcowinkler.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### flockingbird\nA header-only c++ library for creating 2D flocking animations.\nhttp://www.cs.toronto.edu/~dt/siggraph97-course/cwr87/\n\n![demo500](https://user-images.githubusercontent.com/8613031/119993840-52e67280-bfcc-11eb-8697-ae98e67c4900.gif)\n\nThe algorithm uses [kD-Trees](https://github.com/jlblancoc/nanoflann) 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).\n\nPlease 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.\n\n### setup\n(I don't have a windows PC, so just for mac)\n```bash\nbrew install cmake\nbrew install llvm\nbrew install clang-format # for working on the project/formatting\n```\n\n### Dependencies\nFor the demo animation:\n```bash\nbrew install cairo\nbrew install gtk+3\n```\n\nNOTE: i had to\n```bash\nexport LDFLAGS=\"-L/usr/local/Cellar/cairo/1.16.0_5/lib $LDFLAGS\"\n```\n\n### build\n\n```bash\ncd build\ncmake ..\nmake \u0026\u0026 make install\n```\n### build and test\n```bash\n./test.sh\n```\n\n### run demo\n```bash\n./build/flockingbird_demo\n```\n\n### emacs integration\n\nmake sure that compile_commands is linked to the root\n\n```bash\nln build/compile_commands.json .\n```\n\n### Credits/Disclaimer\nResources used for development\n- http://www.vergenet.net/~conrad/boids/pseudocode.html\n- https://p5js.org/examples/simulate-flocking.html\n\n### Bindings\n- [Swift](https://github.com/falcowinkler/flockingbird-swift) (Work in progress)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcowinkler%2Fflockingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalcowinkler%2Fflockingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcowinkler%2Fflockingbird/lists"}