Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

core.make (procNode)

Make geometry on the device from a count for each owner and a shape. Every owner makes its own piece and the pieces sit end to end with their links already offset.

The make kernel's sizes pass, a prefix sum of the sizes, and the make kernel's fill pass; the columns are set into an empty geometry. The totals the fill pass is sized by come from the counts when every owner makes count (a row of points needs one multiplication, the other shapes one call of the make module); a count the graph states is a number already and the cook does not wait on the device for it, and a count left on the device is read back. When counts gives each owner its own, the totals are read back from the prefix sum.

Inputs

  • shape (one of points, strip, fan, grid, ring). Default "points". What each owner makes: a row of points, a zigzag of triangles, triangles round a centre, a lattice of quads, or one closed primitive round a circle.
  • counts (Column<Int>). One count for each owner: the points along its main axis. Left out, every owner makes count.
  • count (Number). Default 0. At least 0. The points along the main axis of each owner when counts is left out.
  • owners (Number). Default 1. At least 0. How many owners make a piece when counts is left out.
  • across (Number). Default 2. At least 2. For the grid: how many points it holds along its second axis.

Outputs

  • geometry: the geometry with P on its points (the unit square or the unit circle), pt on its vertices and vstart and vcount on its primitives; a ring also carries closed.

Example

local made = g.core.make({ shape = "grid", count = 3, across = 3 })

A 3 by 3 lattice: 9 points and 4 quads.