Ch8n
06/20/2021, 12:18 AMFlocking Algorithm
in Jetpack Compose Canvas API 🚀
- I created the implementation of 2D Vectors in p5js
in Kotlin
, you can see the implementation [here](https://github.com/ch8n/Compose-boids-flocking/blob/main/src/main/kotlin/utils.kt)
- Used vector to resolve the forces acting on the particles cohesion, Alignment and Separation
- Lastly created a push force vector for mouse
checkout the code from here
https://github.com/ch8n/Compose-boids-flocking
share some love on twitter if you like it
https://twitter.com/Ch8n2/status/1406395627173384192?s=20