# Boids
MATLAB implementation of Boids simulation, as part of school project
[Boids][boids] is an artificial life program that simulates the flocking behavior of birds.
[boids]: https://en.wikipedia.org/wiki/Boids
The movement of boids is governed by three principles:
1. separation: each boid steers away from all other neighborin boids to not collide.
2. alignment: each boid steers towards the average directions of other neighboring boids.
3. cohesion: each boid steers towards the center position of the neighboring boids.
The three principles give rise to the emergent behavior of boids flocking with each other, resembling that of birds.
This implementation also includes predators that chase the boids. Boids try to run away from the predators when they are within a certain distance.
## How to run
Run Boids.m to produce the simulation in avi format.
## How to change setting
Boids.m contains the parameters that determine:
1. number of boids
2. number of predators
3. height & width of the world
4. simulation length
5. maximum speed of boids and predators
Play around with the settings.
The initial positions and velocities of boids and predators are always random, so each simulation will produce a unique outcome.
## Boids without predators
![caption](videos/without-predators.gif)
## Boids with predators
![caption](videos/with-predators.gif)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计&课设-作为学校项目的一部分,Boids仿真的MATLAB实现.zip (16个子文件)
matlab_code
.idea
vcs.xml 180B
misc.xml 185B
inspectionProfiles
profiles_settings.xml 174B
modules.xml 262B
Boids.iml 284B
.gitignore 47B
World.m 3KB
bresenham.m 1KB
Boid.m 10KB
videos
with-predators.gif 18.36MB
with-predators.avi 3.55MB
without-predators.gif 11.2MB
without-predators.avi 3.1MB
Predator.m 919B
README.md 1KB
Boids.m 2KB
共 16 条
- 1
资源评论
白话机器学习
- 粉丝: 1w+
- 资源: 7705
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- JSF和Struts技术的学习PPT资料,深入解析JavaServer Faces和Apache Struts框架的应用与实践
- C#调用sql类工具类
- Flutter:构建高性能跨平台应用的新纪元.pdf
- 麻醉药品和精神药品的管理与使用考题20231116.docx
- 基于C语言的学生成绩管理系统+高分项目+源码.7z
- 基于Ruby开发的校园选课系统+源码+开发文档+界面展示+代码解析(毕业设计&课程设计&项目开发)
- Delphi 12 控件之创建目录读书笔记 v1.31 (by 寂寞沙洲).zip
- 虚拟串口Virtual Serial Port Driver Pro 10 支持win10
- kubernetes resource源码
- tgyijdhrtfujt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功