You are here

Circular Grids

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

This script will make a grid of circles. You input the diameter of the circles, the number of circles in the X and Y directions, the space between the edges of the circles, and if you want the circles in a rectangular or a hexagonal grid. The two attached images show pictures of the default rectangular and hexagonal grid created by this script. The circles and background can be any colors. This script could be useful for selection masks, making pictures of bubble wrap, or lots of other things that I haven't thought of!

The script shows up in the Filters/SambrookJM menu in GIMP, but this can be changed by editing the last line in the .scm file. Copy this into your GIMP scripts directory, and it should work just fine. If anyone has any problems or suggestions, let me know and I'll try to fix it.


Update #3 - Now with circle, square, hexagonal and octagonal goodness! I got rid of the earlier versions of the script, so the one posted here is the correct one. Diamonds will probably be a different script, since there are several other variables that are specific to diamonds that aren't used by the other shapes.

Code License: 
GIMP Version: 
Scripting Engine: 


You mean like a maximum and minimum size for the circles in the grid?
Or smaller circles to "fill in" the grid to make it more densely packed?

The first would be quite a bit easier than the second.

Like wacmaster, I'd like to see two possibilities become reality with different sized circles.

1. To fill a selection with randomly sized circles (in theory it seems simple, but I know it's very complex). Several of us at GIMP Chat have been trying to create a circle method to accommodate using along side stippling and voronoi renderings. To give you an idea of that, see here:

2. On the grid side of creating circles, I would love to be able to have more than one size circle on the grid. Like in your hex method, having smaller circles between larger circles, etc. Or even possibly more sizes mixed in the hex grid. Duotone like grids (see example):

I realize this could be possible by running the circle grid script a few times, using different sizes and colors, overlaying the layers, etc.

Yeah, the Voronoi pattern is something I'd really like to be able to figure out, but it is hugely complex. I'm just not that talented. :-(

Two-toned circles should be pretty easy...I'll try working on that.

i didn't make sense of my request.
What i meant was different sized circles all over.

My apologies.

Anyway to add smoothing or anti-aliasing to the options (to smooth out the edges)?

Nice script, regardless. Thanks! :)

That's a very easy change to make:

In the script, you will find on line 91 (at least, it's 91 in my script)
(gimp-ellipse-select theImage xStart yStart circDiam circDiam CHANNEL-OP-REPLACE FALSE FALSE 0)

Change this line to
(gimp-ellipse-select theImage xStart yStart circDiam circDiam CHANNEL-OP-REPLACE TRUE FALSE 0)

and you've got anti-aliasing.

Worked like a charm, thanks again. :)

I like easy fixes like that one. I'll add in an option for that once I figure out what wacmaster meant by "different sized circles" for the script.


Subscribe to Comments for "Circular Grids"