1
$\begingroup$

picture

Inspired by this, I'm using Graphics to generate such a image, but it return

new picture

I want every disk to be the same color. How to modify to make it work? Using image related functions is OK, DiskMatrix etc.

Graphics[Table[{{Opacity[0.5],White,Disk[{0,0},11.25]},
  {RGBColor[{136,28,255}/255],Disk[{x,y},0.25]}},{x,-15,15},{y,-15,15}],
     Background->Yellow, PlotRangePadding->None]
$\endgroup$

1 Answer 1

6
$\begingroup$

Take the large disk outside Table and use Opacity[1]:

Graphics[{Opacity[1], White, Disk[{0, 0}, 11.25], 
  Table[{{RGBColor[{136, 28, 255}/255], Disk[{x, y}, 0.25]}},
    {x, -15,  15}, {y, -15, 15}]}, 
   Background -> Yellow, PlotRangePadding -> None]

enter image description here

$\endgroup$
2
  • $\begingroup$ I want every disk to be the same color. $\endgroup$
    – matrix42
    Commented Jun 14, 2019 at 12:14
  • $\begingroup$ @mathe, please see the updated version. $\endgroup$
    – kglr
    Commented Jun 14, 2019 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.