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
390
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
160
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
280
Agile Software Development for Software Developers
fabrik42
0
53
Phoenix Live View
fabrik42
0
610
Rails API-only considerations
fabrik42
0
370
Org-Mode
fabrik42
0
530
Cleaner, scalable views with object oriented components
fabrik42
0
370
Headless Browser Experiments
fabrik42
0
400
Other Decks in Programming
See All in Programming
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
780
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
190
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
660
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.6k
How Software Deployment tools have changed in the past 20 years
geshan
0
6k
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
110
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
260
[SF Ruby Conf 2025] Rails X
palkan
0
350
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
2
8.7k
Building AI with AI
inesmontani
PRO
1
260
無秩序からの脱却 / Emergence from chaos
nrslib
1
8.5k
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
12
7.2k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.1k
Visualization
eitanlees
150
16k
Site-Speed That Sticks
csswizardry
13
970
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
980
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Docker and Python
trallard
46
3.7k
Balancing Empowerment & Direction
lara
5
760
4 Signs Your Business is Dying
shpigford
186
22k
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/