Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
10

Random Image Distribution and Placement

Explorer ,
Mar 11, 2024 Mar 11, 2024

Hey there,

 

For a school project I'd like to distribute and place about 200–250 images randomly (in size and position) onto an InDesign spread. I assume that it's a very basic script but I have almost no knowledge about InDesign-scripting so I'd be very glad for any kind of help.

Screenshot 2024-03-11 at 15.13.38.png

Attached you can find an example of how I want to distribute them by script. Until now it was made manually.

 

Thanks very much in advance and really looking forward to hearing from you,

xx

TOPICS
Scripting
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 11, 2024 Mar 11, 2024

Using the Content Collector tool to place the images yourself randomnly would be faster than the time it would take anyone to write a script to do that. It's not exactly simple, as you'd need an algorithm to account for even spread in the randomness. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2024 Mar 11, 2024

Thanks for your answer, really appreciated! As it's for my bachelor thesis I'd like to have a lot of iterations and image combinations and then choose from one. So it would be much easier to once invest time into a functional script and then generating compositions by mouse-click.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 12, 2024 Mar 12, 2024
LATEST

Hi @severinw53785042, can I just point out, for the benefit of anyone having a go at coding this, that what you show in your screenshot is not a simple random distribution. *Far* from it.

 

Some notes:

1. There are no "gaps"—or almost none—where the canvas is empty.

2. There seems to be a limit on the number of "levels of overlap"—it looks like, at most, no more than, maybe, four or five images can overlap at any given point—and those "maximal overlay" places are very rare, too—the vast majority of points are one or two levels deep.

3. Nowhere is there an image that *isn't* overlapped by several of its neighbours.

 

So any distribution algorithm will have to consider these things I believe, and would not be a simple random distribution.

- Mark

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines