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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Christian Bäuerlein
April 19, 2018
Programming
410
1
Share
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
180
Single File Ruby Programs 2.0
fabrik42
1
220
Single File Ruby Programs
fabrik42
0
310
Agile Software Development for Software Developers
fabrik42
0
60
Phoenix Live View
fabrik42
0
640
Rails API-only considerations
fabrik42
0
390
Org-Mode
fabrik42
0
560
Cleaner, scalable views with object oriented components
fabrik42
0
380
Headless Browser Experiments
fabrik42
0
420
Other Decks in Programming
See All in Programming
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
440
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3k
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
190
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
690
Back to the roots of date
jinroq
0
790
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
110
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
350
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
330
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
250
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
140
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
280
The Curse of the Amulet
leimatthew05
1
12k
Producing Creativity
orderedlist
PRO
348
40k
30 Presentation Tips
portentint
PRO
1
290
Facilitating Awesome Meetings
lara
57
6.8k
KATA
mclloyd
PRO
35
15k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Agile that works and the tools we love
rasmusluckow
331
21k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Optimizing for Happiness
mojombo
378
71k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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/