Halftone vector - how to extract from photo with custom shape (not dot) and custom size between elements

Does anybody have knowledge of a macro that automatically extracts halftone effects from photo/bitmap?

I'm interested in controlling the shape that repeats itself (not dot, any shape for that matter) and especially

the distance between the multiplied elements...

Thanks!