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
350
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
130
Single File Ruby Programs 2.0
fabrik42
1
190
Single File Ruby Programs
fabrik42
0
210
Agile Software Development for Software Developers
fabrik42
0
43
Phoenix Live View
fabrik42
0
530
Rails API-only considerations
fabrik42
0
340
Org-Mode
fabrik42
0
480
Cleaner, scalable views with object oriented components
fabrik42
0
340
Headless Browser Experiments
fabrik42
0
360
Other Decks in Programming
See All in Programming
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
時計仕掛けのCompose
mkeeda
1
300
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
220
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
Grafana Cloudとソラカメ
devoc
0
170
ARA Ansible for the teams
kksat
0
150
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
840
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
120
Immutable ActiveRecord
megane42
0
140
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
172
14k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
A designer walks into a library…
pauljervisheath
205
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Designing for Performance
lara
604
68k
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/