🌿 L 系统生成器L-System Generator
根据公理与改写规则迭代生成 L 系统字符串。本地处理。可设置「公理」、「规则(多条用分号分开,如 X → X+YF+; Y → -FX-Y)」、「迭代次数」。Iterate an L-system from an axiom and rewrite rules. Processed locally. Settings: Axiom, Rules (separate several with semicolons, e.g. X → X+YF+; Y → -FX-Y), Iterations.
使用说明与常见问题How-to & FAQ
「L 系统生成器」是什么?What is the L-System Generator tool?
根据公理与改写规则迭代生成 L 系统字符串。本地处理。可设置「公理」、「规则(多条用分号分开,如 X → X+YF+; Y → -FX-Y)」、「迭代次数」。Iterate an L-system from an axiom and rewrite rules. Processed locally. Settings: Axiom, Rules (separate several with semicolons, e.g. X → X+YF+; Y → -FX-Y), Iterations.
如何使用「L 系统生成器」?How do I use the L-System Generator tool?
在「L 系统生成器」中,按需设置「公理」、「规则(多条用分号分开,如 X → X+YF+; Y → -FX-Y)」、「迭代次数」,结果会实时显示在下方,点击「复制结果」即可复制。In the L-System Generator: Adjust "Axiom", "Rules (separate several with semicolons, e.g. X → X+YF+; Y → -FX-Y)", "Iterations"; the result appears below instantly — click "Copy result" to copy it.
规则怎么写?How do I write the rules?
每条规则写成「符号 → 替换串」,箭头可用 →、->、=>、= 或 :。多条规则用分号分开(如 X → X+YF+; Y → -FX-Y),也接受逗号后紧跟下一条规则的写法。左边必须是单个符号;左边写了多个字符、同一符号写了两条规则、或右边又出现箭头时,页面会提示而不是悄悄忽略。右边可以为空,表示删除该符号。Write each rule as 'symbol → replacement'; the arrow can be →, ->, =>, = or :. Separate several rules with semicolons (e.g. X → X+YF+; Y → -FX-Y); a comma directly followed by the next rule also works. The left side must be one symbol: a multi-character left side, two rules for one symbol or a second arrow on the right side gives a message instead of being silently ignored. An empty right side deletes that symbol.
支持哪些符号?迭代上限?Which symbols? Iteration limit?
任意字符都可作字母;绘图约定里 F/G 前进,+/- 转向,[] 分支,本工具只输出字符串。迭代 0–12 次,结果最多 500000 个字符;超出时会说明在第几次迭代超长、应减到几次(例如科赫规则最多 8 次)。Any character can be a letter; drawing conventions use F/G to move, +/- to turn and [] to branch, but this tool only outputs the string. Iterations run 0–12 and the result can be up to 500,000 characters; beyond that the message says which iteration overflowed and how far to reduce (for example, the Koch rule allows at most 8).
输入和输出是什么样的?What does the input and output look like?
例如在「L 系统生成器」中把「公理」设为 F,「规则(每行一条,如 F → F+F--F+F)」设为 F → F+F,「迭代次数」设为 2,输出为:F+F+F+F。For example, in the L-System Generator with "Axiom" set to F, "Rules (one per line, e.g. F → F+F--F+F)" set to F → F+F, "Iterations" set to 2, the output is: F+F+F+F.
有哪些选项可以调整?What options can I adjust?
「L 系统生成器」的设置:「公理」默认 F;「规则(多条用分号分开,如 X → X+YF+; Y → -FX-Y)」默认 F → F+F--F+F;「迭代次数」默认 3。每次生成结果都按当前设置处理。Settings in the L-System Generator — "Axiom" default F; "Rules (separate several with semicolons, e.g. X → X+YF+; Y → -FX-Y)" default F → F+F--F+F; "Iterations" default 3. The result always uses the current settings.
计算精度如何?How precise are the results?
「L 系统生成器」中的整数都用大整数(BigInt)精确计算,不经过浮点,所以再长的项也不会丢失位数;输入超出页面说明的范围时会给出提示,而不是悄悄截断。Integers in the L-System Generator are computed exactly with big integers (BigInt), with no floating-point step, so even very long terms keep every digit; values outside the stated ranges give a message instead of being silently cut off.
「L 系统生成器」免费吗?需要注册吗?Is the L-System Generator free? Do I need an account?
「L 系统生成器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The L-System Generator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.