https://github.com/elucidation/boids-vpython
Boids implementation using Visual Python
https://github.com/elucidation/boids-vpython
Last synced: 10 months ago
JSON representation
Boids implementation using Visual Python
- Host: GitHub
- URL: https://github.com/elucidation/boids-vpython
- Owner: Elucidation
- Created: 2012-05-08T03:15:43.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-05-08T16:32:46.000Z (about 14 years ago)
- Last Synced: 2025-02-10T00:16:26.529Z (over 1 year ago)
- Language: Python
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
VPython Boids implementation
---
A basic [boids](http://www.red3d.com/cwr/boids/) implementation using the 3 main rules of Boids & 1 global rule

* Seperation
va = sum of inverse distances to neighbors that are too close
* Alignment
vb = average of neighbor velocities
* Cohesion
vc = velocity towards center of mass of neighborhood
* Global goal to origin
vd = velocity towards (0,0,0) origin of system
Combination of all rules with tweakable weights
```
v[i] = k0*v[i] + k1*va + k2*vb + k3*vc + k4*vd
```
