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
AWS Serverless Application Model入門_20250708
smatsuzaki
0
130
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
2.3k
パスタの技術
yusukebe
1
400
自作OSでDOOMを動かしてみた
zakki0925224
1
1.4k
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
230
SOCI Index Manifest v2が出たので調べてみた / Introduction to SOCI Index Manifest v2
tkikuc
1
110
『リコリス・リコイル』に学ぶ!! 〜キャリア戦略における計画的偶発性理論と変わる勇気の重要性〜
wanko_it
1
600
Understanding Ruby Grammar Through Conflicts
yui_knk
1
140
未来を拓くAI技術〜エージェント開発とAI駆動開発〜
leveragestech
2
180
Claude Codeで挑むOSSコントリビュート
eycjur
0
180
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
210
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
730
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Facilitating Awesome Meetings
lara
55
6.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
570
For a Future-Friendly Web
brad_frost
179
9.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Practical Orchestrator
shlominoach
190
11k
Thoughts on Productivity
jonyablonski
69
4.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
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/