Skip to main content
Jongware
Community Expert
Community Expert
October 1, 2010
Answered

[Ann] Design effect - image made of perfectly arranged circles

  • October 1, 2010
  • 35 replies
  • 155080 views

Ever wondered how to perfectly fill an outline with touching circles? I did -- after seeing the example image in Solving design effect - image made of perfectly arranged circles.

 

It took me a while to get the proper calculations, but -- Here It Is! A Javascript, written for Illustrator CS4 (it might work on other versions as well), that fills a selected outline with circles. Download zipped script from my site: #1 http://www.jongware.com/binaries/CircleFill.zip #2 (https://shared-assets.adobe.com/link/7cf1dee2-08bc-435f-6fbc-546d36937712) unpack if necessary, and put it in your Illustrator Scripts folder to make it available the next time you run Illy, or anywhere else (you have to browse for it each time).

 

Select any path -- but no live text, please; you have to convert it to outlines and select each character in turn. Then run the script.

It displays a simple dialog, where you can set a maximum and minimum circle size as a percentage of the selected object size. In addition, you can select either a plain basic color, or select any of your current Swatch Groups; in that case, each of the circles are filled with a random color from that group.

 

The script may take a while to run. Usually, only a couple of seconds for a simple rectangle, but it may run into minutes for objects with lots of curves and/or holes. I didn't have the guts to run it on a vectorized world map, to recreate Mario "Quasimondo" Klingemann's Foam World Map; but, in theory? Possible.

 

This image only took a few minutes:

 

 

Enjoy, everyone!

 

{Script Download Link option Updated by MOD}

Correct answer Anshul_Saini

Hi @Merchant Girl and @Long98A1,

 

Thank you for reaching out. I have added a second option to download the script created by OP @Jongware.

I hope it helps.

 

Thanks & regards,

Anshul Saini

35 replies

Mystical_master5E08
Participant
August 5, 2020

Hi, did anyone solve Error 8705 on CC2020?

I tried all verisons but with no luck...

schroef
Inspiring
June 20, 2020

Does someone perhaps know of a script which works like this but with path objects. What I'm looking for is a scripts which basically fills an artobard with a given set of path objects. The solution I'm looking for is that the script should check what the optimal method is for filling the cardboard with scaling. BUt it can do rotation and and flipping

Monika Gause
Community Expert
Community Expert
June 20, 2020

"The solution I'm looking for is that the script should check what the optimal method is for filling the cardboard with scaling. BUt it can do rotation and and flipping"

 

This is called nesting. Software that can do it is usually quite expensive, although there is also opensource software available. In Illustrator you could try the plugins ColliderScribe (but doesn't work automatically) or Stipplism.

Participating Frequently
January 22, 2020

Is there a plugin/script similar where intead of circles, I can select a bunch of objects from the canvas and have those randomly fill inside the vector? 

Jacob Bugge
Community Expert
Community Expert
December 2, 2019

Theunis,

 

I have just posted (yet again) in defence of you and many others here:

 

https://community.adobe.com/t5/back-room/scripting-subforums-title-changed-by-mod/td-p/10743619

 

Jacob Bugge
Community Expert
Community Expert
October 12, 2019

Yusufa,

 

"Hi, can you please explain how to do this to texts. I am trying to do this to texts, but it is not working."

 

As I (mis)understand it, you are trying in vain with live Type. This is what the OP says about it:

 

Select any path -- but no live text, please; you have to convert it to outlines and select each character in turn. Then run the script.

Known Participant
November 25, 2019

Hi everyone

I would like to generate an isihara-picture for red/green colorblind people. We are doing a quick workshop to wake the awareness of A11y of all kinds and this would illustrate it pretty cool.

Just to be sure - would this script work in Photoshop CC2018 too? I get that nasty error21 at line 11  8-/

Here's what I did:
I put in some text. I transformed it to "form", then selected each letter with the path-tool. I then opened file -> scripting -> opened the script and got the error.

 

 

Would I have to put a layer underneath with the circles? Thanks for the help
Michelle

Jongware
Community Expert
JongwareCommunity ExpertAuthor
Community Expert
December 1, 2019

Michelle, this is an Illustrator script only. Scripts are written for one type of software only, because each software has a different purpose and so it has its own set of commands. Theoretically it should be possible to rewrite this script to work in Photoshop, but it has been too long ago for me to try that. (Although – funny fact – the very first Adobe scripting I ever did was for Photoshop. But that was near the turn of the century...)

 

I'd also not recommend using Photoshop for your purpose, unless you indeed must have a raster image as a result. If this is going to print, use Illustrator! Or even when you're going to spread your document around as a PDF. This preserves the circles as vectors, meaning they will stay circle-like even when zoomed in.

 

If you do need a raster image, you still can create it in Illustrator and then export as PNG, GIF, or JPEG, and it should also be possible to copy-and-paste the Illy artwork into Photoshop.

yusufa19064743
Participant
October 12, 2019

Hi, can you please explain how to do this to texts. I am trying to do this to texts, but it is not working.

Participant
September 29, 2019

thnks good job

BenjiGreig
Participant
January 23, 2017

I'm also seeing a similar issue when I try to use the latest version of the script with Illustrator CC 2017. However I get the following:

Love to help more let me know if you'd like me to test anything.

Participant
January 12, 2017

I also am getting this error when using latest version of CC.

I've tried it on multiple shapes, multiple variable changes, and multiple layers and I just get this error whenever i try it at all. Is there something I'm doing wrong?

I've tried it on layers with only one shape, and layers with multiple shapes, tiny circles, large circles, black circles, multi colored circles, small / no distance / large distances and always get this error.

Any help?

Monika Gause
Community Expert
Community Expert
January 12, 2017

CyannaEd schrieb:

I also am getting this error when using latest version of CC.

I've tried it on multiple shapes, multiple variable changes, and multiple layers and I just get this error whenever i try it at all. Is there something I'm doing wrong?

I've tried it on layers with only one shape, and layers with multiple shapes, tiny circles, large circles, black circles, multi colored circles, small / no distance / large distances and always get this error.

Any help?

Are you using the latest version of the script (see at the bottom of page 1 of this thread)

Participant
November 29, 2016

Hey I just ran this script in CC and I got this error: