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
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
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
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
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
850
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
150
AI 輔助遺留系統現代化的經驗分享
jame2408
1
840
スマートグラスで並列バイブコーディング
hyshu
0
230
A2UI という光を覗いてみる
satohjohn
1
140
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing Experiences People Love
moore
143
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
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/