Selective Trails using createGraphics

Creating trails, by drawing on top of what's already on the canvas instead of clearing it (via background()), is a popular technique. But what about when you want one shape to leave a trail, but another shape to draw at a new position (or size, or orientation) each time, without leaving a trace of its previous state? Here's a solution that uses createGraphics().