Framing your art with box shadows

Title
Making box shadows in generative art
Published

After spending actual hours manually adding box shadows to images for my post on

, I decided to figure out how to get the computer to do that work instead.

I’m just trying to draw pretty simple box shadows, but I couldn’t find a good article explaining it, so I figured I’d do some experimenting and share what I’d found.

If your drawing library lets you blur shapes, the idea is simple: draw a box, then blur it.

If that’s not an option, you can get the same effect with almost any drawing library by drawing a bunch of low-opacity black rectangles, then offsetting their positions a random amount using Gaussian noise.