Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flocking Simulation with Phoenix Channels
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Christian Bäuerlein
April 19, 2018
Programming
430
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flocking Simulation with Phoenix Channels
Code can be found here:
https://github.com/fabrik42/flocking_elixir
Christian Bäuerlein
April 19, 2018
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
200
Single File Ruby Programs 2.0
fabrik42
1
230
Single File Ruby Programs
fabrik42
0
330
Agile Software Development for Software Developers
fabrik42
0
65
Phoenix Live View
fabrik42
0
660
Rails API-only considerations
fabrik42
0
420
Org-Mode
fabrik42
0
580
Cleaner, scalable views with object oriented components
fabrik42
0
390
Headless Browser Experiments
fabrik42
0
440
Other Decks in Programming
See All in Programming
ジョジョの世界をXRで再現する
mofurune
0
160
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
980
気持ちぃ〜角丸 Squircle
ryu1013
0
290
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
170
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
150
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
Prompt Engineering for Job Search
mfonobong
0
510
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
HDC tutorial
michielstock
2
960
Optimising Largest Contentful Paint
csswizardry
37
4k
A designer walks into a library…
pauljervisheath
211
25k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Un-Boring Meetings
codingconduct
0
450
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
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/