Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

points.cylinder (procNode)

Points in or on a cylinder standing on an axis through its centre, each carrying N: the way straight out from the axis. Use it for columns of particles, tree trunks of scatter, and rings (shell 0, small height).

Draws on channels 0 to 2 of the emit scope: the angle around the axis, the radial share (points.shell_radius with dims 2, so the skin fills evenly by area), and the height.

Built from: rand.unit, points.axis_basis, points.shell_radius, core.points, math.*.

Inputs

  • count (Float, default 256, at least 0). How many points. Each is drawn on its own, so raising this fills the same shape denser without moving the points already there.
  • seed (Float, default 1). Which of the possible layouts this is; the same seed draws the same points on every run and platform.
  • center (Vec3, default (0, 0, 0)). Where the shape stands.
  • axis (Vec3, default (0, 1, 0)). The direction the cylinder stands along.
  • radius (Float, default 1). The cylinder's radius.
  • height (Float, default 1). The cylinder's full height along the axis, centred on center.
  • 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.

Outputs

  • points (Points). count points carrying P, N (unit, perpendicular to the axis) and id.
local tube = g.points.cylinder({ count = 200, radius = 0.5, height = 2, shell = 0 })