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
380
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
150
Single File Ruby Programs 2.0
fabrik42
1
200
Single File Ruby Programs
fabrik42
0
260
Agile Software Development for Software Developers
fabrik42
0
48
Phoenix Live View
fabrik42
0
580
Rails API-only considerations
fabrik42
0
360
Org-Mode
fabrik42
0
520
Cleaner, scalable views with object oriented components
fabrik42
0
360
Headless Browser Experiments
fabrik42
0
390
Other Decks in Programming
See All in Programming
MCP連携で加速するAI駆動開発/mcp integration accelerates ai-driven-development
bpstudy
0
270
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
3
780
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
710
大規模FlutterプロジェクトのCI実行時間を約8割削減した話
teamlab
PRO
0
450
Quality Gates in the Age of Agentic Coding
helmedeiros
PRO
1
120
AIのメモリー
watany
12
1.2k
令和最新版手のひらコンピュータ
koba789
0
100
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
950
Understanding Kotlin Multiplatform
l2hyunwoo
0
250
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
110
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
160
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
240
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
328
39k
GitHub's CSS Performance
jonrohan
1031
460k
Agile that works and the tools we love
rasmusluckow
329
21k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Scaling GitHub
holman
461
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
19k
Music & Morning Musume
bryan
46
6.7k
Typedesign – Prime Four
hannesfritz
42
2.7k
A Tale of Four Properties
chriscoyier
160
23k
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/