黏菌网络
gpu-io Physarum,Amanda Ghassaei,2022 年

正在布展…
它是怎么做的
- 第 1 步每个粒子有位置和朝向,存储在浮点纹理里
- 第 2 步粒子在前方、左前、右前三个点采样痕迹图,向浓度最高的方向转向
- 第 3 步粒子前进后在所在像素沉积痕迹
- 第 4 步痕迹图每帧做一次模糊(扩散)并乘以衰减系数
- 第 5 步痕迹图直接作为画面,按浓度上色
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Keep agent positions and headings in a float texture and a separate trail-map texture. In an agent update shader, sample the trail at a sensor distance ahead, ahead-left and ahead-right by a sensor angle, rotate the heading toward the strongest reading (with a little randomness), and step forward. Render agents as points additively into the trail map to deposit, then run a 3x3 blur and multiply by a decay factor. Display the trail map with a colour ramp and expose sensor angle, distance, turn rate and decay as sliders.
档案
性能开销
视觉强度
实现难度
尺度为策展判断(1 到 5),用于比较和推荐。
核实记录:Opened https://apps.amandaghassaei.com/gpu-io/examples/physarum/ (200, title 'Physarum'); repo amandaghassaei/gpu-io exists, licence MIT via GitHub API; examples/physarum contains index.html and index.js.


