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
420
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flocking Simulation with Phoenix Channels
Code can be found here:
https://github.com/fabrik42/flocking_elixir
Christian Bäuerlein
April 19, 2018
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
190
Single File Ruby Programs 2.0
fabrik42
1
220
Single File Ruby Programs
fabrik42
0
320
Agile Software Development for Software Developers
fabrik42
0
63
Phoenix Live View
fabrik42
0
650
Rails API-only considerations
fabrik42
0
400
Org-Mode
fabrik42
0
570
Cleaner, scalable views with object oriented components
fabrik42
0
380
Headless Browser Experiments
fabrik42
0
430
Other Decks in Programming
See All in Programming
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
490
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
130
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
150
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
220
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.6k
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
440
1B+ /day規模のログを管理する技術
broadleaf
0
140
自作OSでスライド発表する
uyuki234
1
3.8k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
330
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
170
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
170
KATA
mclloyd
PRO
35
15k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
We Are The Robots
honzajavorek
0
280
Abbi's Birthday
coloredviolet
3
8.6k
Embracing the Ebb and Flow
colly
88
5.1k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
170
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Between Models and Reality
mayunak
4
370
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
220
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/