Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit95280a384c

README.md

curve.line (procNode)

A straight curve from start to finish, subdivided into segments: point i of segments + 1 stands at start + (finish - start) * i / segments.

Built from: core.points, attribute.number, curve.from_points.

Inputs

  • start (Vec3). Default { x = 0, y = 0, z = 0 }. Where the line begins.
  • finish (Vec3). Default { x = 1, y = 0, z = 0 }. Where the line ends.
  • segments (Float). Default 1. At least 1. How many equal spans the line is cut into, leaving segments + 1 points.

Outputs

  • curve: one open curve of segments + 1 points, each carrying P and its number id.

Example

local line = g.curve.line({ start = vector.create(0, 0, 0), finish = vector.create(4, 0, 0), segments = 4 })

Five points at x = 0, 1, 2, 3, 4, with id 0 to 4.