Documentation / Node reference / code nodes
code/SDFArc2D
The unsigned distance to a circular arc in the plane.
Sdf2d
Returns the distance from a sampled plane position to a circular arc: the part of the circle of radius `r` around `t` that runs counter-clockwise from `angleStart` to `angleEnd`, in degrees from X toward Y. Only the span between the two angles matters, wrapped into one turn, and equal angles give the full circle. An arc has no interior, so the distance is never negative; subtract a width with code/SDFOffset to make a band. The twin of geo/SDFArc2D, for use inside a geo/SDFBuilder sub-network.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector2 | Plane position to sample the field at. Left unwired it reads the builder's own sample position. |
| t | Vector2 | Center of the arc's circle. |
| r | Float | Radius of the arc's circle. |
| angleStart | Float | Where the arc starts, in degrees counter-clockwise from X. |
| angleEnd | Float | Where the arc ends, in degrees counter-clockwise from X. The same angle as the start gives the full circle. |
See also
- geo/SDFArc2D
- code/SDFSegment2D
- code/SDFCircle2D
- code/SDFOffset
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.