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
310
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
180
Agile Software Development for Software Developers
fabrik42
0
41
Phoenix Live View
fabrik42
0
460
Rails API-only considerations
fabrik42
0
290
Org-Mode
fabrik42
0
420
Cleaner, scalable views with object oriented components
fabrik42
0
300
Headless Browser Experiments
fabrik42
0
320
Other Decks in Programming
See All in Programming
Regular Expressions, REXML, Automata Learning
makenowjust
0
180
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
430
エラーレスポンス設計から考える、0→1開発におけるGraphQLへの向き合い方
bicstone
4
670
マイグレーションコード自作して File-Based Routing に自動移行!! ~250 ページの歴史的経緯を添えて~
cut0
1
250
GoのIteratorに詳しくなってしまう
inatonix
1
180
What is Parser
yui_knk
8
2k
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
870
Scala におけるコンパイラエラーとの付き合い方
chencmd
1
200
Amebaチョイス立ち上げの裏側 ~依存システムとの闘い~
daichi_igarashi
0
220
全力の跳躍を捉える計測アプリを作る
ogijun2018
0
1.1k
REXML改善のその後
naitoh
0
150
Go Code Generation at newmo / 2024-08-27 #newmo_layerx_go
genkey6
0
520
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
242
11k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
It's Worth the Effort
3n
182
27k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.2k
Clear Off the Table
cherdarchuk
90
320k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
Six Lessons from altMBA
skipperchong
26
3.3k
Debugging Ruby Performance
tmm1
72
12k
Practical Orchestrator
shlominoach
185
10k
Git: the NoSQL Database
bkeepers
PRO
425
64k
How to name files
jennybc
75
98k
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/