Skip to main content

vJSONTangentVector

Builds a tangent vector at each path point and outputs the start, end or flipped end points.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONTangentVector node

vJSONTangentVector takes an array of XYZ path points and outputs, for each point, one end of a tangent line: the point itself (Start), the point plus the tangent (End), or the point minus the tangent (flipped).

Parameters​

ParameterTypeDefaultDescription
ModeDropdownStartStart (default), End or flipped. Start gives the path points, End adds the vector and flipped subtracts it.
Rotate AngleInteger0Rotation of each vector around Z in degrees. Integer, slider 0 to 360, default 0.
Scale FactorFloat1Length of the vector. Range 0 to 1, default 1.
PathDATATYPE—JSON family. Path points, in order.
Read the full description

The tangent at a point is the direction to the next point in X, Y and Z, made unit length and multiplied by Scale Factor. The last point reuses the direction of the last segment. Rotate Angle then rotates the vector around the Z axis by that many degrees.

Mode picks the output: Start gives the path points unchanged, End gives the point plus the vector, and flipped gives the point minus the vector. With Scale Factor 0 all three are the same. Scale Factor runs from 0 to 1 and defaults to 1. The path needs at least 2 points with exactly 3 numbers each.

Example Connections​

vJSONPointsOnArc.Output -> vJSONTangentVector.ArrayPath
vJSONTangentVector.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input