While unsuspectingly exploring ways to position a QR code over the large majority of a round label, I found myself in a situation where no fully satisfying visual outcome would seem likely after a few attempts, hence the square peg / round hole reference.
There are examples of square QR codes in which unread or junk modules are placed in the margins, and within a circular area surrounding a centered QR code; search "round + QR + code"
Arguments of an ideal solution which seeks to fill the margin space would be:
datato be encoded (obviously)diameterin a unit consistent with how the size of the QR code is set
The function would randomly generate the additional modules to fill out a circle whose center point is the center of the QR code and which is sized by diameter. The pst-barcode package would be used to generate the associated QR code.
Any suggestions on approaches for (a) randomly generating the junk modules, and (b) disallowing modules touching, falling on, or falling beyond the circle defined by diameter would be greatly appreciated.
A very quick, painstaking, equally acceptable but ugly approach is to just to hard code a bunch of modules manually. Any suggestions as to code snippets for this are fair game.