# Using Mathematica to make a graphics array of circles

I need to make .svg file that contains an array of black circles that all have radii of 5 units ad are evenly spaced apart from each other 32 units.

The difficulty in creating this design is the sheer number of circles necessary. I will need a 3175 by 3175 array. At first I tried doing this manually in Adobe Illustrator, but then it occurred to me that I could write a code to do it for me in Mathematica.

n = 50;
mat = Flatten[Table[{32 i, 32 j}, {i, 0, n - 1, 1}, {j, 0, n - 1, 1}], 1];
g = Disk[#, 5] & /@ mat;
Export["circle_array.svg", Graphics[g], "SVG"];


Above is the code I wrote, and it for a small number of rows/columns, it works just fine. After it's created, I open it up in Adobe Illustrator, and it looks just fine.

However, when I try to increase the number of rows much greater than 100 X 100, after it's exported and I open it up in Adobe Illustrator. I notice that not all the circles are evenly spaced away from each other, and I don't understand why.

If anyone could help, it would be greatly appreciated.

-
Do they look evenly spaced prior to exporting? i.e. does Graphics[g] look OK in Mathematica? –  blochwave Jun 5 '14 at 11:31
It looks correct for me in PDF: picture here. –  Öskå Jun 5 '14 at 12:56
Can you elaborate on the odd spacing? Perhaps a screenshot would help. Could this be a rendering issue with AI? Oh, and do you want circles or disks? –  Yves Klett Jun 5 '14 at 20:58

n = 200;

DXF export does a terrible job with Disk, as it tries to approximate the disk with a number of polygons. This bloats the dxf file and takes about forever. Circle works better, but for your huge number of circles dxf will be a really bad choice. –  Yves Klett Jun 5 '14 at 21:22