Skip to main content

vArrayTorus

Generate points on a torus from a major radius, a minor radius and segment counts around the ring and the tube.

BeginnerMograph / ArrayArrayScriptValJSON
vArrayTorus node

vArrayTorus has no input and outputs an array of XYZ points on a torus that lies in the XY plane around the Z axis. U Segments and V Segments set the point count, and U Sweep limits how much of the ring is generated.

Parameters​

ParameterTypeDefaultDescription
Major RadiusFloat0.35Distance from the center of the torus to the center of the tube. Minimum 0.001, default 0.35.
Minor RadiusFloat0.1Radius of the tube. Minimum 0.001, default 0.1.
U SegmentsInteger24Number of positions around the ring. Clamped to 3 or more, default 24.
V SegmentsInteger12Number of points around the tube at each ring position. Clamped to 3 or more, default 12.
U SweepFloat360Angle covered around the ring, in degrees. Range 0 to 360, default 360.
+1 more parameters
ParameterTypeDefaultDescription
Include EndInteger0.0When on, the last ring position lands on the end of the sweep. When off, it stops one step short. Default off.
Read the full description

The node places V Segments points around the tube at each of U Segments positions around the ring, so the output holds U Segments * V Segments points, ordered ring position by ring position. For ring angle u and tube angle v, X = (Major Radius + Minor Radius * cos v) * cos u, Y = (Major Radius + Minor Radius * cos v) * sin u and Z = Minor Radius * sin v.

With the defaults (Major Radius 0.35, Minor Radius 0.1, 24 U Segments, 12 V Segments, U Sweep 360) the node outputs 288 points forming a closed torus centered on the origin. The tube angles always cover a full circle.

U Sweep sets the angle covered around the ring, from 0 to 360 degrees. Include End decides where the last ring position lands. With it off, the sweep is divided by U Segments, so a 360 degree sweep stops one step short of the start and no ring is repeated. With it on, the sweep is divided by U Segments - 1, the last ring lands on the end of the sweep, and a 360 degree sweep puts the last ring on top of the first.

Both segment counts are clamped to 3 or more. The node does not compare the two radii, so a Minor Radius larger than the Major Radius gives a self-intersecting surface. The output contains points only, with no edges or faces.

Example Connections​

vArrayTorus.Output -> vArrayCameraProjection.ArrayA
vArrayCameraProjection.Output -> vArrayShapeRender.ArrayPoint
Background.Output -> vArrayShapeRender.Input