📄 生成折纸序列Generate Paperfolding Sequence
生成规则折纸(龙曲线)序列 OEIS A014577:反复向同一方向对折纸条,展开后的折痕方向,1 表示谷折、0 表示峰折。本地处理。Generate the regular paperfolding (dragon curve) sequence, OEIS A014577: fold a strip in half repeatedly in the same direction and read the creases after unfolding, 1 for a valley fold and 0 for a mountain fold. Processed locally.
使用说明与常见问题How-to & FAQ
「生成折纸序列」是什么?What is the Generate Paperfolding Sequence tool?
生成规则折纸(龙曲线)序列 OEIS A014577:反复向同一方向对折纸条,展开后的折痕方向,1 表示谷折、0 表示峰折。本地处理。Generate the regular paperfolding (dragon curve) sequence, OEIS A014577: fold a strip in half repeatedly in the same direction and read the creases after unfolding, 1 for a valley fold and 0 for a mountain fold. Processed locally.
如何使用「生成折纸序列」?How do I use the Generate Paperfolding Sequence tool?
在「生成折纸序列」中,按需设置「项数」,结果会实时显示在下方,点击「复制结果」即可复制。In the Generate Paperfolding Sequence: Adjust "Terms"; the result appears below instantly — click "Copy result" to copy it.
用的是哪种约定?Which convention is used?
与 OEIS A014577 一致:从第 1 项起,把 n 写成 2^k·(2m+1),m 为偶数时取 1、为奇数时取 0,所以开头是 1 1 0 1 1 0 0 1 1 1 0 0。若需要 0/1 互换的版本(OEIS A014707:0 0 1 0 0 1 1 0…),把每个 1 和 0 对调即可。It matches OEIS A014577: starting from term 1, write n = 2^k·(2m+1) and take 1 when m is even and 0 when m is odd, so it begins 1 1 0 1 1 0 0 1 1 1 0 0. For the complemented version (OEIS A014707: 0 0 1 0 0 1 1 0…), swap every 1 and 0.
和龙曲线有什么关系?How is it related to the dragon curve?
把 1 读作右转、0 读作左转(或反之),每走一步按序列转 90°,画出来的就是贺氏龙曲线。Read 1 as a right turn and 0 as a left turn (or the other way round), turning 90° after each step: the path traced is the Heighway dragon curve.
输入和输出是什么样的?What does the input and output look like?
例如在「生成折纸序列」中把「项数」设为 8,输出为:1 1 0 1 1 0 0 1。For example, in the Generate Paperfolding Sequence with "Terms" set to 8, the output is: 1 1 0 1 1 0 0 1.
有哪些选项可以调整?What options can I adjust?
「生成折纸序列」的设置:「项数」默认 32;可勾选:「每行一个」。每次生成结果都按当前设置处理。Settings in the Generate Paperfolding Sequence — "Terms" default 32; tick boxes: "One per line". The result always uses the current settings.
计算精度如何?How precise are the results?
「生成折纸序列」输出的每一项都是精确的整数(只有 0 和 1,按整数位运算得到),计算中没有舍入,也不涉及浮点精度问题。Every term the Generate Paperfolding Sequence outputs is an exact integer (only 0 and 1, from integer bit operations); there is no rounding and floating-point precision never comes into play.
「生成折纸序列」免费吗?需要注册吗?Is the Generate Paperfolding Sequence free? Do I need an account?
「生成折纸序列」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Generate Paperfolding Sequence is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.