Capped torus

Capped torus icon

In: SDF function > Primitive

Description

An SDF function for a capped torus, where the sweeping of the minor circle along a major circle can be capped at an angle.
Both circles have adjustable radiuses.

Inputs

Inputs

Major radius Float
The radius of the major circle along which the minor circle is swept to form the surface of the torus.

Default: 0.5
Minor radius Float
The radius of the minor circle being swept along the major circle to form the surface of the torus.

Default: 0.2
Angle Float
The central angle, in turns, defining the trimming arc of the major circle along which the minor circle will not be swept.

Default: 0.75
Angle offset Float
The offset, along the major radius, of the trimming arc along which the minor circle will not be swept.

Default: 0
Symmetrical Boolean
Controls whether the trimming arc should be drawn in one or two directions.

Default: True
Center position Float3
The world space position of the pivot of the capped torus.

Default: (0, 0, 0.5)
P Float3
The transformed world space position. Use this input to apply additional transformations using the Offset P and Rotate P nodes.

Default: The untransformed world space position.
recommendation-more-help
dd48abc6-e399-43d2-9777-578ec70c5a23