Giter VIP home page Giter VIP logo

boids_algorithm's Introduction

Boids Algorithm

This project is a 2D simulation of the Boids Algorithm, rendered using Three.js and controlled interactively with Dat.GUI. The simulation illustrates the flocking behaviour of birds, an artificial life program known as "Boids."

The Boids Algorithm is a simulation of collective behavior, such as bird flocking or fish schooling. It consists of individual agents, called "Boids," following simple rules to achieve flocking behavior:

  • Alignment: Boids align themselves with the average heading of their neighbors.
  • Separation: Boids avoid getting too close to each other to prevent collisions.
  • Cohesion: Boids steer towards the average position of their neighbors.

The term "Boids" represents a simulated flocking behaviour, which was originally developed by Craig Reynolds in 1986. You can read more about the Boids algorithm on its Wikipedia page. https://en.wikipedia.org/wiki/Boids

Demo

Visit the live demo at the link below:

Live Demo

The demo allows you to view a simulation of the Boids algorithm. Use the interactive controls to adjust various parameters and see how the Boids respond in real-time.


Prerequisites

Before you begin, ensure you have the following:

  • Git: You'll need Git, a version control system, to clone this project. You can download and install Git from the official website: Git Downloads

  • Node.js and npm: This project relies on Node.js, a JavaScript runtime, and npm (Node Package Manager) for managing dependencies and running the development server. You can download and install Node.js, which includes npm, from the official website: Node.js Downloads

Cloning and Running the Project

To run this project locally, follow these steps:

  1. Clone the project repository to your local machine using the following command:

    git clone https://github.com/RhysMarch/Boids_Algorithm
  2. Navigate to the project directory:

    cd <project_directory>
  3. Install the required dependencies (three and dat.gui) using npm:

    npm install three dat.gui
  4. Start the development server using Vite:

    npx vite
  5. Open your web browser and go to the provided localhost link in your terminal. You can now interact with and explore the Boids Algorithm simulation.

boids_algorithm's People

Contributors

rhysmarch avatar actions-user avatar

Watchers

 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.