Coder Social home page Coder Social logo

boids's Introduction


Boids Simulation

Georgia Tech CSE 6730 Fall-2023 Modeling and Simulation Project

Live Demo · Taichi Demo · Taichi Code

About The Project

Built With

  • Next
  • React
  • TypeScript
  • ReactThreeFiber
  • ThreeJS

File Structure

.
├── src
# Render part
│   ├── components
│   │   ├── MyCanvas.tsx
│   │   ├── BoidsRenderer.tsx
│   │   │   ├── useFrame (update per frame)
# UI part
│   │   ├── ControlPanel.tsx
# Logic part
│   ├── models
│   │   ├── Bird
│   │   │   ├── index.ts
│   │   ├── Predator
│   │   │   ├── index.ts
│   │   ├── Obstacle
│   │   │   ├── index.ts
│   │   ├── Rule
│   │   │   ├── index.ts (Rule Base Class)
│   │   │   ├── Basic
│   │   │   │   ├── Alignment.ts
│   │   │   │   ├── Cohesion.ts
│   │   │   │   ├── Separation.ts
│   │   │   ├── Extented
│   │   │   │   ├── AvoidPredator.ts
│   │   │   │   ├── AvoidObstacles.ts
# State Management
│   ├── hooks
│   │   ├── useBoidsConfig.tsx

Getting Started

First, install dependencies:

npm install

Then, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Roadmap

  • Logic Part

    • Three basic rules
      • Alignment
      • Cohesion
      • Separation
    • Boundless or Bouce off edge
    • Speed limit
    • Additional rules
      • Direction noise
      • Avoid Predator
      • Avoid Obstacle
      • Goal setting
    • Predator/Prey Model
      • Single Predator
      • Multiple Predators
      • Energy Model
        • for predator, starvation makes it more aggressive
        • for prey, starvation makes it more likely to be caught
        • for prey, perching occasionally to rest and regain energy
  • Rendering part

    • Use InstancedMesh and shared material to render boids (reduce draw calls)
  • More interative

    • Adjust config through UI
    • Next Frame button
    • Soft Refresh
    • Drag to move obstacle
    • Mouse click concentration
  • Data/Simulation Analysis

    • Simulate "Flocking" behavior with different rule weights
    • Simulate "Avoid Predator" rule
    • Simulate "Avoid Obstacle" rule
    • How to measure the number of flocks
    • Track the number of flocks over time
    • Track the number of boids in each flock over time
    • Track the alive rate of boids when a predator is present over time given birds flock or not

License

License: MIT

Contact

Molin Deng - @molin - [email protected]

Useful Links

boids's People

Contributors

molindeng 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.