Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

points.grid (procNode)

A flat lattice of points in the XZ plane, centred on the origin. Each count is at least 1, and the box the cells fill is the counts times spacing (value.math), so the points span (count - 1) times spacing on each axis. grid.box, one cell thick at height y, lays out the cells, x fastest, then z, on the device, and each cell's centre is one point. attribute.remove takes the cell layout off the detail so the lattice reads as Points, and each point carries its own number as id.

Inputs

  • countX (Int, default 4): how many points along X. The grid holds countX x countZ points and stays centred on the origin, so each one added widens it by spacing, half of that to either side. Below 1 reads as 1.
  • countZ (Int, default 4): how many points along Z. A count of 1 leaves a single row running along X. Below 1 reads as 1.
  • spacing (Float, default 1.0): distance between neighbouring points, the same on both axes. The grid spans (countX - 1) x spacing by (countZ - 1) x spacing.
  • y (Float, default 0.0): the height the whole lattice sits at. Every point takes this as its y.

Outputs

  • points: the lattice, with id numbering each point.

Which graph calls it

This node is built with proc.graph and g:node, and a proc.graph graph calls it as g:node("<id>", "points.grid", ...). A graph built with proc.define calls g.points.grid in its place, the node written in the call form; g.op.points.grid there is refused, naming it.