Mr. Gallagher was unhurt and the mugger was later caught by the police, but one night soon after the mugging, with the image of his attacker's dark silhouette still burned into his memory, Mr. Gallagher was mesmerized by a shadow on the sidewalk. He reached into his pocket and felt the chalk he had used to write the outdoor menu at Bar Tabac, and he dropped to his knees to outline it.

Shadow art was born.

Now Mr. Gallagher heads out on foot or on his bike with a backpack full of chalk, looking for shadows to trace. When he tells you that "everything is fair game," he means it. He has traced everything from hydrants to whole city blocks.

While most people in Carroll Gardens and Park Slope have never seen him, many know his work and they seem to like it. (While the city's administrative code says defacing streets is illegal, it is unclear whether that holds true for sidewalks.)

Patty Wu, owner of Handmade on Smith Street, knows Mr. Gallagher's work because he often stops to trace the shadows of objects in her window display, like women's shirts and lingerie sets. "I love it; It's great, it creates a lot of visual interest and people stop and then see the store," Ms. Wu said of the chalk outlines.

It even stirs a little friendly neighborhood rivalry. "People across the street say, 'How come he does it in front of your store so much?' and I say 'Because I have good lighting,' " Ms. Wu says with a smile.

More than anything, Mr. Gallagher will tell you, his work is meant for pure enjoyment.

"All of my chalk drawings are like graffiti," he said. "It's putting out public art for people who normally wouldn't go to a museum."

Claude DeCastro, the owner of the Hoyt Street bar Kili, saw Mr. Gallagher's chalk art and invited him to put up a show of paintings on canvas in the bar, where it is now displayed.