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
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
100
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
Raku Raku Notion 20260128
hareyakayuruyaka
0
120
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
CSC307 Lecture 04
javiergs
PRO
0
660
CSC307 Lecture 08
javiergs
PRO
0
670
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Faster Mobile Websites
deanohume
310
31k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Testing 201, or: Great Expectations
jmmastey
46
8k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
So, you think you're a good person
axbom
PRO
2
1.9k
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/