Lampblack

Abstract. It is dark in here and you are holding the only lamp. Everything on this page is text, and all of it is solid: it stands in the light and throws a shadow. Nothing was drawn in advance.

The lights are on, so none of that is true at the moment. What follows describes the dark.

Lampblack

Received , revised whenever you move

1 Ink

For most of the history of writing, the blackest ink anyone had came out of a flame. Hold a cold dish over an oil lamp, scrape off the soot, bind it with gum. Lampblack.1

The large type on this page is set in it. Ink gives nothing back, so you never see it directly. You see the light it took.

T=e−𝜎d
(1)What is left of a ray after d pixels of ink. The hairlines are thin enough to let some through. Hold the lamp behind one.

“There is no better, there is no more open door by which you can enter into the study of natural philosophy, than by considering the physical phenomena of a candle.”

M. Faraday, 1861 [1]

2 Chalk

Small type is set in chalk, which is the opposite arrangement. It keeps almost nothing, so this paragraph is exactly as bright as you make it.

A line of it is a hedge rather than a wall. Some of the lamp gets through, less with every row.

3 Ember

Some words bring their own light. The colours were not picked. Each is what a black body glows at that temperature, worked out from Planck’s law when the page loads.

  1. 1100 K
  2. 1850 K
  3. 2700 K
  4. 4100 K
  5. 5500 K
  6. 6500 K
  7. 12 000 K
Figure 1. Seven sources. Bring the lamp close to one and it catches. Click to put it out.Tap one to light it. Tap again to put it out.With the lights on they are only words.

4 Mark

Highlighting was always meant as light. Here it is taken at its word. Select any sentence on this page: it fluoresces, and whatever stands nearby is lit by it.

5 Company

ClickPress and hold anywhere empty to leave a candle. It burns for ninety seconds, gutters, and goes out.

This space intentionally left dark.

6 Method

None of this is an image. The text is ordinary HTML: select it, search it, zoom it, hand it to a screen reader.

Once, at load, every glyph is drawn into a coverage map, and a jump-flood pass [3] turns that into a distance field. Every frame, each lamp is ray-marched through the field using Eq. 1, and the glow from embers and selections is gathered with radiance cascades [2], which is why it has no noise. The light is drawn underneath the text. The text is blended over it.

Press D to step through the intermediate buffers.

Table 1. This frame.
Rays cast—
Cascades—
Lamps—
Matter map—
Frame—
Quality—
L=L0+T0L1
(2)How a cascade is merged into the one below it: the near light, plus whatever the near interval let through of the far.

References

  1. M. Faraday. The Chemical History of a Candle. Griffin, Bohn & Co., 1861. gutenberg.org/ebooks/14474
  2. A. Sannikov. Radiance Cascades: A Novel Approach to Calculating Global Illumination. 2023. github.com/Raikiri/RadianceCascadesPaper
  3. G. Rong and T.-S. Tan. Jump flooding in GPU with applications to Voronoi diagram and distance transform. I3D ’06, 109–116. doi.org/10.1145/1111411.1111431
  4. D. E. Knuth. Computer Modern Typefaces. Addison-Wesley, 1986. Set here in Latin Modern, B. Jackowski and J. M. Nowacki, GUST.
  1. India ink, Chinese ink sticks and printer’s black are all, underneath, soot. ↑

No frameworks, no bitmaps.