What does Brush Smoothness and Fractal Dimension conclude, in numbers, about “The Metrology of Box Counting: What a Dimension Actually Measures”?

Answer: Chapter 5 validates box counting and shows that widening the brush from 0.5 to 5.0 pixels pushes the dimension from 1.0635 to 1.5777, far more than the 0.015 between groups.

Scope of the numbers: Trajectories, paper, ink and scoring parameters are illustrative; all calculations are generated by the book's programs; the book is general analysis, not business, design or medical advice. Marked boxes separate published evidence, runnable Python calculations (21 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.015, 0.5, 1.0635, 1.5777, 5.0

factor variedvalueD 2-32
brush radius px0.51.0635
brush radius px1.51.2738
brush radius px3.01.4496
brush radius px5.01.5777
flying-white share0.01.2738
flying-white share0.31.2529
flying-white share0.61.1985
flying-white share0.81.0591
strokes in character21.1188
strokes in character41.1965
strokes in character81.2738
strokes in character161.4149
for scale: group gap in p210.015
Show the full program
# Chapter 5. p52: what the dimension of a written character tracks
# Model: a synthetic "character" of k strokes, each a gently curved
# quadratic Bezier stroke placed at random on a 256 px canvas, inked
# with a disc of radius rho; flying white removes a share f of the
# ink pixels at random. D is the box-counting slope over boxes of 2 to
# 32 px, as in p21 and p22. We vary one factor at a time from a base
# of k = 8, rho = 1.5, f = 0. The canvases are synthetic; the gap of
# 0.015 between group means in p21 is printed for scale. Seed fixed.
import math
import random

BOXES = (2, 4, 8, 16, 32)
P21_GAP = 0.015


def slope(pix):
    xs = [math.log(1.0 / s) for s in BOXES]
    ys = [math.log(len({(x // s, y // s) for x, y in pix}))
          for s in BOXES]
    mx, my = math.fsum(xs) / len(xs), math.fsum(ys) / len(ys)
    sxy = math.fsum((a - mx) * (b - my) for a, b in zip(xs, ys))
    return sxy / math.fsum((a - mx) ** 2 for a in xs)


def strokes(k):
    rng = random.Random(20261113)
    out = []
    for _ in range(k):
        a = (rng.uniform(40, 216), rng.uniform(40, 216))
        b = (rng.uniform(40, 216), rng.uniform(40, 216))
        m = ((a[0] + b[0]) / 2 + rng.uniform(-25, 25),
             (a[1] + b[1]) / 2 + rng.uniform(-25, 25))
        out.append((a, m, b))
    return out


def render(strk, rho, f):
    rng = random.Random(20261114)
    r = int(math.ceil(rho))
    disc = [(dx, dy) for dx in range(-r, r + 1) for dy in range(-r, r + 1)
            if dx * dx + dy * dy <= rho * rho]
    pix = set()
    for a, m, b in strk:
        for i in range(801):
            t = i / 800
            x = (1 - t) ** 2 * a[0] + 2 * t * (1 - t) * m[0] + t * t * b[0]
            y = (1 - t) ** 2 * a[1] + 2 * t * (1 - t) * m[1] + t * t * b[1]
            for dx, dy in disc:
                pix.add((int(round(x)) + dx, int(round(y)) + dy))
    return {p for p in sorted(pix) if rng.random() >= f}


if __name__ == "__main__":
    base = strokes(8)
    print("factor varied          value     D 2-32")
    for rho in (0.5, 1.5, 3.0, 5.0):
        print("brush radius px        {:>5.1f}    {:.4f}".format(
            rho, slope(render(base, rho, 0.0))))
    for f in (0.0, 0.3, 0.6, 0.8):
        print("flying-white share     {:>5.1f}    {:.4f}".format(
            f, slope(render(base, 1.5, f))))
    for k in (2, 4, 8, 16):
        print("strokes in character   {:>5d}    {:.4f}".format(
            k, slope(render(strokes(k), 1.5, 0.0))))
    print("for scale: group gap in p21  {:.3f}".format(P21_GAP))

Single source and citation

Fan, Y. (2026). Minimum-Jerk Brush Trajectories, Capillary Ink Flow in Flying-White Strokes and the Fractal Dimension of Stroke Beauty (Version 1.0.0), Chapter 5: The Metrology of Box Counting: What a Dimension Actually Measures. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-229 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026229,
  author    = {Fan, Yafu},
  title     = {Minimum-Jerk Brush Trajectories, Capillary Ink Flow in Flying-White Strokes and the Fractal Dimension of Stroke Beauty},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book