mosaic_tiles_render — PRINTPATH npr op

• Data kinds: image2d × pairs → image2d

• Call: import fullseye as fs; fs.ledger.mosaic_tiles_render(image, sites) (to call the implementation directly, import printpath; printpath.mosaic_tiles_render(image, sites); from the registry, opsprintpath.get("mosaic_tiles_render"))

Usage

Paint each Voronoi cell with the mean of the pixels it owns.

★Why the mean and not something prettier: for a fixed partition the mean

is the `L2`-optimal constant — no other value lowers the squared error

inside the cell. The tile colour is therefore a solution, not a taste, and any

alternative can be *shown* to be worse by evaluating the same sum.

Returns an `image2d`: the mosaic.

Raises `ValueError`: sites not (N, 2) with N >= 1; sites outside the

image; a non-finite or oversized image.

Limits: cells are convex polygons, so this does not imitate the irregular

tesserae of real mosaic and never runs a single tile along an edge the way a

mosaicist would.

Detailed usage guide

• printpath family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_beats_fringes_and_screens — py -3.11 examples/poc_beats_fringes_and_screens.py

Ops the type connects to (they accept image2d as input)

stipple_points_from_image · stipple_energy · stroke_tone_error · halftone_screen · engrave_lines · hatch_field · mosaic_tiles_sites · print_layer_defect_map

Same category (npr)

halftone_screen · halftone_moire_period · engrave_lines · hatch_field · mosaic_tiles_sites


*Provenance: printpath.py — PRINTPATH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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