跳到正文
网页珍奇柜Web Curio

折纸模拟器

Origami Simulator,Amanda Ghassaei,2017 年

正在布展…

原作直展:这是 Amanda Ghassaei 的原始作品,按 MIT 许可证收录(版本 903ef27)。原作原样展出,只去掉了 Google 统计。拖动「Fold Percent」滑块看折痕图折起来,Examples 菜单里有几十种折纸。 许可证全文 · 收录说明

它是怎么做的

  1. 第 1 步解析 SVG 折痕图(山折/谷折)为三角网格
  2. 第 2 步顶点位置、速度存于浮点纹理,在片元着色器中做显式数值积分
  3. 第 3 步约束包括边长、折痕目标角度与面平整度
  4. 第 4 步按每个三角形的应变给网格着色

复刻配方

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

Parse an SVG crease pattern into a triangulated mesh with edges tagged as mountain, valley or flat. Store vertex positions and velocities in floating-point textures and run a GPGPU loop that applies axial spring forces for edge lengths, angular spring forces that drive each crease toward its target dihedral angle times a global fold percentage, and flat-face constraints. Integrate with a small time step several times per frame and read positions in the vertex shader of the display mesh. Color each face by its deviation from rest length to visualise strain.

档案

能不能拿来用

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

性能开销

视觉强度

实现难度

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

核实记录:Demo loads (200); repo has MIT licence.