
In PolyPaths, leaves don’t sprout immediately from the base or stem.
Much like in the natural world, many plants first lift their bodies upward before unfolding their foliage.
To echo this, the system delays the appearance of leaves, letting the growth process breathe — with tension and rhythm that feel more organic, more alive.
Behind the scenes, a parameter called ProgressStart controls this delay.
Each plant sets its own threshold, typically between 10% to 40% of its growth progress.
Only after reaching this benchmark do leaves begin to appear.
You can think of it as a kind of ecological strategy:
“Make sure I can survive, then invest in leaf surface.”
It’s also a form of visual restraint, allowing the structure of the plant to emerge with clarity and intention.
That’s why in many scenes, the lower segments of the stems are clean and sparse,
while leaves, flowers, and fruits cluster toward the middle or top.
This subtly guides the viewer’s gaze upward —
as if drawn by the plant’s will, inviting us to witness where it truly wishes to flourish.

Leaf Arrangements: Poetic Logic at the Node
When a leaf is finally ready to grow, its pattern follows one of three poetic grammars of botany:
Opposite, Alternate, or Whorled.
- Opposite: Two leaves emerge symmetrically from the same node, like a pair of wings. The system places them at mirrored angles — 0.5 and PI-0.5 radians — relative to the branch.
- Alternate: Leaves zigzag along the stem, one at a time, switching sides. A variable called alternateCount toggles the direction with each new leaf.
- Whorled: Multiple leaves (usually 3–4) explode from a single node, arranged evenly in a circle. This uses a WhorledCount to divide the circumference and assign leaf angles.
Each plant randomly selects one of these patterns at birth,
but exceptions occur — especially near the branch tip, where whorled mode often kicks in.
This creates a visual accent, a kind of natural punctuation.
I’ve used this trick in previous works too, like Chaos Research, where Perlin noise surges near the path’s end — a kind of expressive burst, like the dry-brush flick of ink or an intentional splash.
I love that moment — when structure releases into spontaneity.
The Tip Holds a Secret
When growth reaches over 90%, a condition called progressFinalCheck is triggered.
At that moment, the system initiates a special growth logic for the apical tip of the stem.
Often, this results in a burst of whorled leaves (WhorledCount = 3) at the very top.
It’s less about realism, more a declaration:
“This is the plant’s highest reach toward the sun.”
If specialPlantMode is enabled, even more dramatic endings may occur.
For example, in SP2 — the “Rhododendron oldhamii mode” — a vivid cluster of green leaves appears at the top, signaling its botanical identity.
From Chaos Research to PolyPaths, I’ve been honing this choreography of hesitation and emergence.
Leaves never rush in.
一枝未語葉先知
就像自然界中許多植物會先「拉高身體」再展開葉子,
這套系統也刻意延遲葉片的生成時機,
讓生長過程呈現出更接近真實植物的節奏與張力。
在程式邏輯中,我設定了一個葉片的生成的啟動門檻:
變數為 ProgressStart,意思是生長進度需達到一定百分比之後,葉子才會開始長出來。
這個百分比大多落在 10% 到 40% 之間,隨每棵植物隨機設定。
你可以想像它是「植物先確認自己能活下來,才決定投資葉面」,
這除了擬真生態的策略,更是視覺上的留白,讓植物的結構有種秩序。
也因此你會發現,很多畫面中,枝條下段常常是乾淨、單純的線條,
葉子、果實與花多集中在中後段,這讓觀看者的視線會不自覺向上移動,
像是被某種「植物的意志」引導著,去尋找它真正想開展的地方。
三種葉序:節點上的分身術
當葉子開始生成,它們會依照隨機指定的葉序邏輯展開。
這三種葉序——對生、互生與輪生,是植物語言裡非常基本卻富詩意的句型。
- 對生 Opposite 每節生長點同時長出兩片葉子,左右對稱,像一對開口的翅膀。 系統會在相對的兩個方向各生成一片葉子,以 0.5 與 PI-0.5 的角度對稱配置。
- 互生 Alternate 葉子在枝條上交錯生成,一次一片、左右輪替。 程式透過一個名為 alternateCount 的變數,在每次呼叫間切換方向。
- 輪生 Whorled 是一種在同一節點上爆發出三至四片葉片的陣列式排列。 程式會根據隨機設定的 WhorledCount,將葉子平均分布在圓周上。
每棵植物在初始化時,會隨機被指派其中一種葉序,
但這並非絕對,有些特例條件下,葉序也可能被強制覆寫,
例如在枝條的末端,就常常會進入「輪生」模式——這是一種視覺上的重音,也是一種自然收束。
我在過往作品還常使用這個技巧,例如chaos research,perlin noise 的力道,會在路徑的結尾處大爆發,這也像是水墨的筆觸的刷白,或是潑濺,我很喜歡的技巧。
莖頂的秘密:最後一節,總是特別
當生長進度超過 90%,系統會觸發名為 progressFinalCheck 的條件,
啟動一套為莖頂設計的特殊生成邏輯。
最常見的情況,是在莖頂生成一簇輪生葉(WhorledCount = 3),
這種爆發式的結語,未必仿真,更像是在說:「這裡是植物吸收陽光的置高點。」。如果啟動特殊模式(specialPlantMode),莖頂則可能生成更具戲劇性的構造。在SP2也就是紅茄苳模式下,會長出一叢綠葉。
從 Chaos Research 到《植徑集》,我不斷練習這種節點上的判斷。葉子從不倉促地現身,它們等待適合的時機,然後,在對的位置,用驕傲的姿態說出自己的語言、邏輯。