Builtin Library
README.md
points.shell_radius (procNode)
Where in [0, 1] of a radius a point lands so the points fill the skin shell names evenly: by volume (dims 3) or by area (dims 2). points.sphere (dims 3) and points.cylinder (dims 2) scale their radius by it.
radius = (lo + (1 - lo) * draw) ^ (1 / dims) with lo = (1 - clamp(shell, 0, 1)) ^ dims, so the answer lies in [1 - shell, 1].
Built from: math.* over fields.
Inputs
shell(Float, default 1, 0 to 1). How thick a skin of the shape the points fill, as a share of its radius: 1 fills it to the middle, 0 lays every point on its surface.draw(Field<Float>). A unit random draw per element, in [0, 1).dims(Float, default 3; 2 or 3). 3 fills by volume, 2 by area.
Outputs
radius(Field<Float>). The share of the radius each element lands at.
local share = g.points.shell_radius({ shell = 0.2, draw = rand.unit(1, "emit", "sample", 2, g.element.id), dims = 3 })