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
280
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
110
Single File Ruby Programs 2.0
fabrik42
1
160
Single File Ruby Programs
fabrik42
0
150
Agile Software Development for Software Developers
fabrik42
0
38
Phoenix Live View
fabrik42
0
400
Rails API-only considerations
fabrik42
0
260
Org-Mode
fabrik42
0
390
Cleaner, scalable views with object oriented components
fabrik42
0
280
Headless Browser Experiments
fabrik42
0
290
Other Decks in Programming
See All in Programming
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
910
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.4k
Apache Hive 4 on Treasure Data
ryukobayashi
0
300
Ruby Pattern Matching
bkuhlmann
0
930
雑に思考を整理する技術と効能
konifar
60
29k
2 週間で Twitter Bot を作ってみた
contour_gara
0
380
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
330
ゆるい個人開発のススメ
kuroppe1819
10
990
今、知っておきたい! 生成AIエージェントの世界
elith
3
360
Snowflakeで眠ったデータを起こそう!
estie
0
120
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Visualization
eitanlees
136
14k
4 Signs Your Business is Dying
shpigford
175
21k
Practical Orchestrator
shlominoach
182
9.7k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Thoughts on Productivity
jonyablonski
58
3.8k
In The Pink: A Labor of Love
frogandcode
138
21k
RailsConf 2023
tenderlove
4
540
The Pragmatic Product Professional
lauravandoore
25
5.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
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/