4

I want to generate an array of 200 paths with varying (random) lengths.....

enter image description here

I can easily generate the 200 paths.

I'm struggling to find a method or tool to randomize the path lengths. I could, of course, do the randomization manually, but there surely must be a more automated method.

I am aware that the Astute Graphics Extend Path tool will do this...
but I do not have that tool available due to version requirements.

I've scoured the internet to try and find a script, since it seems like such a simple matter. I can't find anything. I may need to try writing a script. I have started researching this, but it's beginning to look like writing something as simple as PathItem.length = rand() may take longer to actually learn how to write properly.

Is anyone aware of any method which will randomize path lengths in Illustrator?

1 Answer 1

4

Easiest way....

  • Create the path array and make sure it is not grouped.
  • Select all and choose Object > Transform > Transform Each...
  • Decrease the Horizontal Scale percentage
  • Make sure the 9-point origin is set to left center
  • Tick the Random box....

enter image description here

Path lengths will be between whatever you use for the Horizontal Scale and 100%.

You can repeatedly tick and untick the Random box to get different results each time, until you are happy. Then just click OK.


Another method....

This method can be helpful is you need more control over the path lengths. While I use a random path here, the vertical path can be any configuration - a curve, specific insets, etc. Allowing you to "shape" the lengths more.

Draw a vertical path across the horizontal path array..

enter image description here

Choose Effect > Distort & Transform > Roughen... And play with the settings to get a very random path.

enter image description here

Click OK and then choose Object > Expand Appearance to "bake in" the randomization on the path (making it a standard path).

  • Select All and grab the Shape Builder Tool.
  • Hold down the Option/Alt key and click-drag across one side of the random path.

This will remove all the stroke parts on that side of the random path.

Then select and delete the random path....

enter image description here

This will leave you an array of random length paths...

enter image description here


Of note: One may think that Pathfinder > Divide would be helpful here as opposed to Shape Builder. It is not. The Divide operation seemingly joins the random path segments to the horizontal array segments, connecting them. Meaning one would need to then manually go in and delete each and every connecting segment.

6
  • Nice work around. Yeah, either this or custom scripting.
    – Lucian
    Commented Dec 24, 2022 at 11:55
  • 1
    @Lucian cant you use transform tool with randomized length then distribute that?
    – joojaa
    Commented Dec 24, 2022 at 12:12
  • @joojaa Transform tool? I assume you mean effect.. and F***** me! The path array must've been grouped when I tried it before.. updating answer....
    – Scott
    Commented Dec 24, 2022 at 12:25
  • I hate when I miss something so simple as ungrouping first... I honestly couldn't figure out why the transform functions weren't working as I expected them to. Perhaps 4am isn't an optimal time to be working :).
    – Scott
    Commented Dec 24, 2022 at 12:33
  • wow, I didn't even know about those options in the transform panel :))) Why are you working at 4am @Scott ?
    – Lucian
    Commented Dec 24, 2022 at 12:50

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.