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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Christian Bäuerlein
April 19, 2018
Programming
1
400
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
170
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
300
Agile Software Development for Software Developers
fabrik42
0
54
Phoenix Live View
fabrik42
0
630
Rails API-only considerations
fabrik42
0
380
Org-Mode
fabrik42
0
550
Cleaner, scalable views with object oriented components
fabrik42
0
370
Headless Browser Experiments
fabrik42
0
410
Other Decks in Programming
See All in Programming
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
510
atmaCup #23でAIコーディングを活用した話
ml_bear
4
720
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
280
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
2.2k
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
130
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
CSC307 Lecture 11
javiergs
PRO
0
580
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
220
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
450
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
570
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Tell your own story through comics
letsgokoyo
1
830
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Music & Morning Musume
bryan
47
7.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
72k
Deep Space Network (abreviated)
tonyrice
0
84
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
310
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/