Skip to content
Русский

The nested figure — the worked recipe

This is the construction two batches of reference images have asked for: a figure nested inside itself, many rings deep, every ring still sharply the same shape. It is three parameters, and coord_mode = "1" is the one that makes it possible.

system = "shape_field"
[palette]
stops = [
{ at = 0.0, color = "#180a12" },
{ at = 0.5, color = "#c02040" },
{ at = 1.0, color = "#ffe0b0" },
]
[params]
shape = "4" # the heart
coord_mode = "1" # <- SCALED COPIES. Without this the notch rounds off.
scale = "0.62"
palette_steps = "9" # THE RING COUNT, and nothing trades against it
gamma = "1.0" # the SPACING only: below 1 crowds them inward
color_span = "0.42" # how much gradient the figure's interior spans
palette_contour = "0.75" # a hairline at each ring

Read the three roles, because under the old coordinate they were not separable:

  • palette_steps is the ring count. Nine rings inside the figure, and the innermost is still a heart.
  • gamma is the spacing, and only the spacing. Below 1 the rings crowd toward the centre, above 1 toward the outline (the table above). Under coord_mode = "0" it also decided how rounded the inner figure was, because the innermost band’s boundary sat at d = ((1/palette_steps)/color_span)^(1/gamma) and a sharp notch needed palette_steps * color_span ~ 1 — which left one band inside the figure. That trade is gone.
  • color_span is the interior’s share of the gradient, and under "1" it means the same thing on every shape.

The old route was to fake it in the palette, and you should not. A since-retired heart reached the ring count by packing 18 stripes as gradient stops below the outline’s coordinate — a 76-stop palette that has to be regenerated whenever the count changes, and one that cannot fix the real defect: the level sets are still offsets, so the inner figure still rounds off. coord_mode = "1" is the documented route, and shape_strataheart takes it.

Built from 13c7582 at version 0.158.0. This site tracks main and is not versioned per release.