Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flocking Simulation with Phoenix Channels
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Christian Bäuerlein
April 19, 2018
Programming
1
400
Flocking Simulation with Phoenix Channels
Code can be found here:
https://github.com/fabrik42/flocking_elixir
Christian Bäuerlein
April 19, 2018
Tweet
Share
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
170
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
290
Agile Software Development for Software Developers
fabrik42
0
53
Phoenix Live View
fabrik42
0
620
Rails API-only considerations
fabrik42
0
380
Org-Mode
fabrik42
0
550
Cleaner, scalable views with object oriented components
fabrik42
0
370
Headless Browser Experiments
fabrik42
0
410
Other Decks in Programming
See All in Programming
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
高速開発のためのコード整理術
sutetotanuki
1
400
AtCoder Conference 2025
shindannin
0
1.1k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
570
CSC307 Lecture 03
javiergs
PRO
1
490
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
AI巻き込み型コードレビューのススメ
nealle
1
280
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
700
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
460
Featured
See All Featured
A Soul's Torment
seathinner
5
2.3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Odyssey Design
rkendrick25
PRO
1
500
Abbi's Birthday
coloredviolet
1
4.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
66
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
From π to Pie charts
rasagy
0
120
We Have a Design System, Now What?
morganepeng
54
8k
Transcript
Flocking Simulation with Phoenix Channels
Flocking Theory
None
Use case: Cinematic effects
Boid: One member of a flock
* Location
* Location * Perception Radius
* Location * Perception Radius * Velocity * Heading
You Need Three Behaviours
1. Cohesion
1. Cohesion
1. Cohesion
2. Alignment
2. Alignment
2. Alignment
3. Separation
3. Separation
3. Separation ! !
3. Separation ! !
* Cohesion * Alignment * Separation = Next move
Architecture
Phoenix BoidsChannel Receives Updates Changes Settings GenServer WorldStateUpdater Calling itself
30 times per second Simulation Calculates new positions per boid based on world state <canvas> Renderer Renders updated world state Socket Connection Receives Updates Changes Settings
Demo Time!
Read on! http://harry.me/blog/2011/02/17/neat-algorithms-flocking/ http://www.red3d.com/cwr/boids/