ifs_fractal — MATH construct op

• Datenarten: keine → pairs (ein Operator, der allein durch seine Argumente bestimmt ist — er nimmt kein Bild und keine Daten entgegen)

• Aufruf: import fullseye as fs; fs.ledger.ifs_fractal(preset='sierpinski', maps=None, n_points=60000, seed=0, burn_in=32) (die Implementierung direkt: import mathops; mathops.ifs_fractal(preset='sierpinski', maps=None, n_points=60000, seed=0, burn_in=32); aus dem Register: opsmath.get("ifs_fractal"))

Verwendung

Chaosspiel auf einem iterierten Funktionensystem — die Dimension ist geschlossen darstellbar.

> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.

Picks a map at random (by `weights`, or by area if none are given), applies

it, and plots the orbit. After a short burn-in the orbit lands on the

attractor and stays there, so the picture is the attractor and not a path to

it.

★**Why this earns its place — two numbers that must agree and were computed

two different ways**:

• *Moran's equation.* For similarities with ratios `r_i` satisfying the

open set condition, the similarity dimension `d` is the unique root of

`sum(r_i**d) == 1` — a closed form read off the maps, before

anything is drawn. Sierpinski gives `log 3 / log 2 = 1.5850`, the Koch

curve `log 4 / log 3 = 1.2619, Cantor dust log 4 / log 3` as well.

• *Box counting.* This repository's existing `fractal_dimension`

operator measures the dimension from the drawing. The two must agree,

and they are not the same computation: one is algebra on the maps, the

other is a regression on a rasterised image.

Hutchinson's theorem gives a third, structural check: the attractor is

invariant, so applying every map to the point set maps it back into

itself.

`maps overrides preset: a sequence of (a, b, c, d, e, f)` meaning

`x -> [[a, b], [c, d]] x + [e, f]`.

Returns `pairs (n, 2)`.

Raises `ValueError`: unknown preset; a map that is not 6 numbers; a map

that is not a contraction (spectral norm >= 1 — the orbit would escape);

`n_points below 1 or over the cap; negative burn_in`.

HALCON: no operator.

Familienweiter Eingabevertrag (fail-closed)

Jeder mathops-Operator prüft seine Eingabe vor der Berechnung (nichts rutscht stillschweigend durch):

• **Komplexe Eingaben lösen ValueError aus** — die Umwandlung nach float64 verwirft den Imaginärteil stillschweigend (numpy meldet nur eine ComplexWarning und liefert eine plausibel aussehende, falsche reelle Zahl). Schreiben Sie .real/.imag/abs() explizit oder nutzen Sie complexops.

• **Masked Arrays mit maskierten Elementen lösen ValueError aus** — die implizite Umwandlung, die die Maske abstreift und die Rohwerte darunter verwendet, wird abgelehnt. Geben Sie explizit an, ob gefüllt oder verworfen wird.

• **NaN/Inf löst bei jeder Eingabe ValueError aus** (mit Anzahl abgelehnt — es pflanzt sich durch das gesamte Ergebnis fort).

• Formen sind strikt: 1-D und 2-D werden nie implizit hochgestuft oder gebroadcastet (eine Matrix im Vektor-Slot oder ein Vektor im Matrix-Slot löst ValueError aus; reshapen Sie explizit).

• Größenobergrenze: Operatoren, die eine Matrix nehmen, sowie die stat_histogram-Bins lösen jenseits von mathops.MAX_ELEMENTS (2^26 ≈ 67 Mio. Elemente) ValueError aus.

Ausführlicher Anwendungsleitfaden

• Leitfaden zur Familie math_metrology

Referenzen (Beispieldaten, Literatur)

• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).

• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.

• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

• poc_theorems_as_pictures — py -3.11 examples/poc_theorems_as_pictures.py

Typkompatible Folge-Operatoren (nehmen pairs als Eingabe)

neighbour_index_gaps · curve_locality

Gleiche Kategorie (construct)

circle_packing_apollonian · ford_circles · phyllotaxis_pattern · neighbour_index_gaps · ifs_similarity_dimension · space_filling_curve · curve_locality


*Provenance: mathops.py — MATH Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.