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
Christian Bäuerlein
April 19, 2018
Programming
1
350
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
130
Single File Ruby Programs 2.0
fabrik42
1
190
Single File Ruby Programs
fabrik42
0
210
Agile Software Development for Software Developers
fabrik42
0
43
Phoenix Live View
fabrik42
0
530
Rails API-only considerations
fabrik42
0
330
Org-Mode
fabrik42
0
480
Cleaner, scalable views with object oriented components
fabrik42
0
340
Headless Browser Experiments
fabrik42
0
360
Other Decks in Programming
See All in Programming
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
890
Formの複雑さに立ち向かう
bmthd
1
710
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
630
ARA Ansible for the teams
kksat
0
140
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
300
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
Ruby on cygwin 2025-02
fd0
0
140
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
730
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Speed Design
sergeychernyshev
25
780
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
29
4.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Thoughts on Productivity
jonyablonski
69
4.5k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
GitHub's CSS Performance
jonrohan
1030
460k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
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/