Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
290
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
540
Cleaner, scalable views with object oriented components
fabrik42
0
370
Headless Browser Experiments
fabrik42
0
400
Other Decks in Programming
See All in Programming
JETLS.jl ─ A New Language Server for Julia
abap34
1
420
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
250
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
130
FluorTracer / RayTracingCamp11
kugimasa
0
240
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.4k
ゲームの物理 剛体編
fadis
0
360
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
400
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
230
愛される翻訳の秘訣
kishikawakatsumi
3
330
LT資料
t3tra
5
920
AIコーディングエージェント(skywork)
kondai24
0
180
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
550
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
BBQ
matthewcrist
89
9.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Test your architecture with Archunit
thirion
1
2.1k
It's Worth the Effort
3n
187
29k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
110
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
500
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
150
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/