Log inGet started
Package

tag_trunks.procNode

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

curve.tag_trunks (procNode)

Curves marked as generation 0 of a growth: every point carries generation 0 and u, how far along its own curve it stands, 0 to 1.

core.arclength gives each point its distance along its curve (s) and each curve its length; the length is carried to the curve's points, u is s / length and generation is 0. curve.branch and curve.grow both start from it.

Built from: core.arclength, attribute.promote, math.*.

Inputs

  • curve (Curves). The curves growth starts from.

Outputs

  • curve: the curves with u and generation on every point. The vertices keep the s and the curves the length that core.arclength wrote.

Example

local line = g.curve.line({ start = vector.create(0, 0, 0), finish = vector.create(4, 0, 0), segments = 4 })
local trunks = g.curve.tag_trunks({ curve = line })

u holds 0, 0.25, 0.5, 0.75, 1 and generation holds 0 on every point.