Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flocking Simulation with Phoenix Channels
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Christian Bäuerlein
April 19, 2018
Programming
440
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
Transcript
24 slides
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/
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
200
Single File Ruby Programs 2.0
fabrik42
1
230
Single File Ruby Programs
fabrik42
0
350
Agile Software Development for Software Developers
fabrik42
0
67
Phoenix Live View
fabrik42
0
670
Rails API-only considerations
fabrik42
0
430
Org-Mode
fabrik42
0
590
Cleaner, scalable views with object oriented components
fabrik42
0
400
Headless Browser Experiments
fabrik42
0
440
Other Decks in Programming
See All in Programming
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
130
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
4.3k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
320
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
SODA - FACT BOOK(EN)
sodainc
1
240
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
190
Railsバージョンを4倍にした話
optim
0
1k
LLM 101
dalinaum
0
490
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.7k
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
230
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
sira's awesome portfolio website redesign presentation
elsirapls
0
510
Abbi's Birthday
coloredviolet
5
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Limits of Empathy - UXLibs8
cassininazir
2
780
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
810
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k