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
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
190
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
410
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
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
AIの中の人になってみる
htkym
0
170
自分的「カンファレンスの楽しみ方」
syumai
0
200
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
150
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.6k
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
760
AIエージェント時代のコードレビューを設計する
nogu66
6
2.6k
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
600
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
460
ソフトウェアラスタライザ
fadis
1
790
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
140
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
First, design no harm
axbom
PRO
2
1.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Odyssey Design
rkendrick25
PRO
2
800
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Optimizing for Happiness
mojombo
378
71k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
580
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
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/