Builtin Library
README.md
points.axis_basis (procNode)
A unit axis and two unit vectors perpendicular to it and to each other, so a direction drawn around the y axis can be turned onto the axis. points.cone and points.cylinder build their directions in this basis, and curve.branch turns a growing direction about an axis perpendicular to it.
u is the cross product of a helper axis and axis (the helper is +Z when axis lies within about 25 degrees of the x axis, else +X), and w is axis cross u; for the default +Y axis u is +Z and w is +X. A direction and its result may be plain vectors or per-element Fields.
Built from: vector.* and g.where over sockets.
Inputs
direction(Vec3, default (0, 1, 0)). The direction. A zero vector reads as up.
Outputs
axis(Vec3).directionscaled to length 1.u(Vec3). A unit vector perpendicular toaxis.w(Vec3). The unit vector perpendicular to both.
local basis = g.points.axis_basis({ direction = vector.create(1, 0, 0) })
local axis, u, w = basis.axis, basis.u, basis.w