Documentation / Node reference / code nodes

code/SDFIFS2D

The distance to a Koch snowflake or a Sierpinski triangle.

Sdf2d

Returns the signed distance from a sampled 2D position to a self-similar shape: the Koch snowflake or the Sierpinski triangle. The twin of geo/SDFIFS2D, for use inside a geo/SDFBuilder sub-network.

Parameters

Name Type What it does
P Vector2 Position to sample the field at. Left unwired it reads the builder's own sample position.
t Vector2 Center of the shape.
size Float Radius of the circle the shape fits inside, which is the distance from the center to each corner.
shape UInt8 KOCH_SNOWFLAKE · SIERPINSKI_TRIANGLE The shape to draw: the Koch snowflake, or the Sierpinski triangle.
iterations UInt8 How many levels of detail are made. 0 is a plain triangle. A wired value is capped at 16.

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.