My go-to choice for this has been SVG. For shapes as the ones in the post it's trivial to write by hand and equally trivial to generate various amounts of raster images in various sizes. It's been quite helpful for preparing Android and iOS app icons without constantly having to revise half a dozen different images whenever one changed. It's also easy to change opacity or colour of the shapes/strokes for generating icons for different themes (Holo Dark and Holo Light on Android need different colours, for example).