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
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
290
Agile Software Development for Software Developers
fabrik42
0
53
Phoenix Live View
fabrik42
0
620
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
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
Patterns of Patterns
denyspoltorak
0
1.4k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
AI巻き込み型コードレビューのススメ
nealle
1
250
「ブロックテーマでは再現できない」は本当か?
inc2734
0
990
並行開発のためのコードレビュー
miyukiw
0
130
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
CSC307 Lecture 09
javiergs
PRO
1
840
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
570
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
Featured
See All Featured
Scaling GitHub
holman
464
140k
RailsConf 2023
tenderlove
30
1.3k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Leo the Paperboy
mayatellez
4
1.4k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Invisible Side of Design
smashingmag
302
51k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
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/