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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Raku Raku Notion 20260128
hareyakayuruyaka
0
130
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.2k
CSC307 Lecture 05
javiergs
PRO
0
500
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
AI時代の認知負荷との向き合い方
optfit
0
160
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
並行開発のためのコードレビュー
miyukiw
0
170
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Data-Centric Kaggle
isax1015
2
770
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Into the Great Unknown - MozCon
thekraken
40
2.3k
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/