Henry Hunt’s “graffiti prevention apparatus,” patented in 1997, offers a novel way to keep city walls clean: Paint manufacturers would mix magnetic material into their products, and a sensor near each building would sense when a vandal was near.
“When a proximity sensor on, or in the vicinity of, the structure is triggered by an approaching intruder, a magnetic field created along the targeting surface acts to repel the spray of marking media directed at it.”
Alternatively, the sensor would direct a signal to the spray-paint can, turning the nozzle away from the wall or shutting off the flow of paint. But I guess the spray-paint manufacturers would all have to participate … and vandals may be their biggest market.