Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 851 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 851 Bytes

Boids

使用C++、OpenGL、Eigen模拟实现了Boids算法 主要参考了一位大佬的p5.js代码,用C++进行重写


boids算法原理 :https://www.red3d.com/cwr/boids/


运行效果:

  • 初始状态:无序运动(Nocontrol)

  • A,添加Alignment

  • S,添加Separation

  • C,添加Cohesion

  • F,添加三种作用

  • 其他按键,不添加作用,继续无序运动