Skip to main content

vScriptValLogarithmicSpiral

Generate a logarithmic spiral as segment points or polygon points, with growth, expansion, angle range and step controls.

BeginnerMograph / ScriptValScriptValArrayJSON
vScriptValLogarithmicSpiral node

vScriptValLogarithmicSpiral has no input and outputs an array of XYZ points on a spiral r = a * e^(b * theta) that rises slowly along Z. Mode chooses between segment triplets and polygon pairs.

Parameters​

ParameterTypeDefaultDescription
ModeDropdownSpiralSpiral writes three points per step. Polygon writes two points per step, offset sideways from the curve. Default Spiral.
Growth coefficientFloat0.04Growth coefficient a in r = a * e^(b * theta). Minimum 0.01, default 0.04.
Expansion factorFloat0.22Expansion factor b in r = a * e^(b * theta). Minimum 0.01, default 0.22.
Max angleInteger6Largest angle in units of pi. Minimum 1, default 6.
Step sizeFloat1.23Angle step in radians. Minimum 0.1, default 1.23.
+2 more parameters
ParameterTypeDefaultDescription
RotationFloat0Angle the spiral is turned around the Z axis, in degrees. Default 0.
Scale FactorFloat1Hidden control. It is read by the node but has no effect on the output. Default 1.
Read the full description

The node steps the angle theta from Step Size up to Max Angle * pi in increments of Step Size. At each step the radius is r = Growth Coefficient * e^(Expansion Factor * theta), the position is X = r * cos theta and Y = r * sin theta, and Z = theta * 0.05. X and Y are then rotated around the Z axis by Rotation, in degrees. The Z rise of 0.05 per radian is fixed.

In Spiral mode each step writes three points: the previous point, the midpoint between the previous and current points, and the current point. The first previous point is the origin. With the defaults (Growth Coefficient 0.04, Expansion Factor 0.22, Max Angle 6, Step Size 1.23) there are 15 steps, so the node outputs 45 points.

In Polygon mode each step writes two points: the current point moved by 0.05 in the direction (sin theta, -cos theta), and the previous point. The same defaults give 30 points. Z is the same as in Spiral mode.

Max Angle is a whole number counted in units of pi, so 6 gives three full turns. A smaller Step Size gives more steps and a smoother curve. The number of steps is about Max Angle * pi / Step Size. The hidden Scale Factor control is read by the node but not used in the calculation.

Example Connections​

vScriptValLogarithmicSpiral.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input