Thanks for the pointers!
I will try this out and see if I can extend it to rectangles as well. If nothing else, it might be possible to add circles in a manner similar to a fourier transform.
I will report back during the week.