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
300
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
120
Single File Ruby Programs 2.0
fabrik42
1
180
Single File Ruby Programs
fabrik42
0
170
Agile Software Development for Software Developers
fabrik42
0
38
Phoenix Live View
fabrik42
0
440
Rails API-only considerations
fabrik42
0
290
Org-Mode
fabrik42
0
410
Cleaner, scalable views with object oriented components
fabrik42
0
300
Headless Browser Experiments
fabrik42
0
310
Other Decks in Programming
See All in Programming
Prompt FlowによるLLMアプリケーション開発
yuto2000
1
1k
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
DMMプラットフォームにおけるTiDBの導入から運用まで
pospome
7
3k
CSC307 Lecture 10
javiergs
PRO
0
310
【Go言語】ジェネリクス
tomo1227
0
170
しくじり先生 Image Matching Challenge 2024 編
goosehaaan
0
810
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
Android開発者のための Kotlin Multiplatform入門
ntaro
0
190
リハビリmruby
kishima
1
160
Product Management LT会_クアンド新家
shinshin
0
210
CSC307 Lecture 13
javiergs
PRO
0
150
HMSコンペ 11th Solution (team : kansai-kaggler)
t88
1
680
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
What's in a price? How to price your products and services
michaelherold
239
11k
Code Reviewing Like a Champion
maltzj
517
39k
The Invisible Customer
myddelton
117
13k
Into the Great Unknown - MozCon
thekraken
20
1.3k
Optimizing for Happiness
mojombo
373
69k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
224
21k
Raft: Consensus for Rubyists
vanstee
134
6.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
25
6.7k
How to name files
jennybc
67
96k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
245
1.2M
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/