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
410
1
Share
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
170
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
300
Agile Software Development for Software Developers
fabrik42
0
54
Phoenix Live View
fabrik42
0
630
Rails API-only considerations
fabrik42
0
390
Org-Mode
fabrik42
0
560
Cleaner, scalable views with object oriented components
fabrik42
0
380
Headless Browser Experiments
fabrik42
0
420
Other Decks in Programming
See All in Programming
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
160
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.1k
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
320
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
120
Feature Toggle は捨てやすく使おう
gennei
0
450
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
350
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
Don't Prompt Harder, Structure Better
kitasuke
0
620
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
440
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
Featured
See All Featured
Believing is Seeing
oripsolob
1
110
The Curse of the Amulet
leimatthew05
1
11k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
97
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
A Soul's Torment
seathinner
6
2.6k
Amusing Abliteration
ianozsvald
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/