Documentation / Node reference / code nodes
code/SDFIFS2D
Returns the distance to a Koch snowflake or a Sierpinski triangle.
Sdf2d
Returns the distance to a self-similar 2D shape. Each level adds smaller bumps to the snowflake, or cuts smaller holes out of the triangle.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector2 | Where to sample. Unwired, the builder's sample position. |
| t | Vector2 | Center of the shape. |
| size | Float | Distance from the center to each corner. |
| shape | UInt8 KOCH_SNOWFLAKE · SIERPINSKI_TRIANGLE | Which shape to draw. |
| iterations | UInt8 | Levels of detail. 0 is a plain triangle. |
See also
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.