"""Original schematic for Paper 58. Python 3.14; root matplotlib/numpy dependencies. Caller supplies MPLCONFIGDIR; output is this script's basename PNG in cwd only. """ from pathlib import Path import os if not os.environ.get("MPLCONFIGDIR"): raise RuntimeError("Set MPLCONFIGDIR to a caller-owned writable cache directory") import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.patches import Polygon import numpy as np plt.rcParams.update({"font.size": 10, "axes.titlesize": 13}) fig,ax=plt.subplots(figsize=(8,6),facecolor="white") def poly(points, color="white", edge="#333333", alpha=1): ax.add_patch(Polygon(points, closed=True, facecolor=color, edgecolor=edge, lw=1.4, alpha=alpha)) def line(points, color="#333333", style="-", lw=1.5): xs,ys=zip(*points);ax.plot(xs,ys,color=color,ls=style,lw=lw) def label(x,y,s,**kw): ax.text(x,y,s,ha="center",va="center",**kw) poly([(0,0),(2,2),(4,0),(2,-2)],"#edf4ff") poly([(0,0),(-2,2),(-4,0),(-2,-2)],"#edf4ff") poly([(0,0),(2,2),(0,4),(-2,2)],"#e6f4eb") poly([(0,0),(2,-2),(0,-4),(-2,-2)],"#f3f3f3") poly([(2,2),(0,4),(2,6)],"#fff1dc") poly([(-2,2),(0,4),(-2,6)],"#fff1dc") line([(-2,2),(0,4),(2,2)],"#bb3322",lw=2.3) line([(2,2),(2,6)],"#222222",lw=3) line([(-2,2),(-2,6)],"#222222",lw=3) line([(-3.8,0),(3.8,0)],"#4167aa","--",1.7) line([(-2,6),(0,8),(2,6)],"#777777","--") label(0,2,"trapped region\n$r_-