跳到正文
网页珍奇柜Web Curio

多边形寓言

Parable of the Polygons,Vi Hart & Nicky Case,2014 年

正在布展…

原作直展:这是 Vi Hart & Nicky Case 的原始作品,按 CC0(公有领域) 许可证收录(版本 3ec3fd7)。原作网站原样展出。它的页面要和自己内嵌的小窗口通信,所以是唯一一件以同源方式运行的原作;它的代码不读写任何存储,也不发网络请求。往下滚动,拖动小三角和小方块。 许可证全文 · 收录说明

它是怎么做的

  1. 第 1 步网格上的每个形状根据邻居中同类比例决定是否「不开心」。
  2. 第 2 步用户可以手动拖动形状,也可以开启自动迁移模拟。
  3. 第 3 步滑杆调整偏好阈值,实时显示隔离指数曲线。
  4. 第 4 步文字与交互穿插,构成叙事。

复刻配方

一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。

Lay out a grid of agents of two types with some empty cells and draw each as a simple shape with a face whose expression reflects happiness. An agent is unhappy if the share of same-type neighbors in its 8-neighborhood falls below a threshold from a slider. Let users drag agents to empty cells, and add a run button that repeatedly moves random unhappy agents to random empty cells. Plot a segregation metric over time in a small line chart beside the grid, and interleave the interactive panels with short narrative paragraphs.

档案

能不能拿来用

原作以 CC0-1.0 许可开源:可以阅读源码学习,按许可证条款使用;在自己的项目里引用时保留原作者署名。

性能开销

视觉强度

实现难度

尺度为策展判断(1 到 5),用于比较和推荐。

核实记录:Opened ncase.me/polygons (HTTP 200, title 'Parable of the Polygons…'); gh api: CC0-1.0, README confirms public domain.