Just in case anyone's making patterns or something. I wrote this tiny script that rotates all selected objects by random increments of 60 degrees, or 90, or whatever you want. It makes use of modulo for efficiency. Free to use and share. Please post to this thread anything you create with it as I believe it could produce some interesting patterns, mazes, etc. If you can find a way to do the same thing using just AI native tools please share your technique here. Any bugs / feedback please also post here so I can improve the script. First, a section of a seamless pattern I made just now using 3 hexagonal tiles and a few tricks (custom line profiles, Roughen filter, etc). Enjoy! Runninghead_Design 2020 // Script to rotate all selected objects by set increments with the intention that it will be useful for the generation of pattern tiles. Copyright runninghead.com 2020. If you use this script please send me examples of your work, I'd love to see what you can do with it! Any suggestions / bug reports welcome.
// NOTE: Does not currently work through Groupings, so Ungroup your objects before running this script!
aDoc = app.activeDocument;
aSel = aDoc.selection;
nSel = aSel.length;// number of objects currently selected in illustrator
increment = Number(prompt("Rotation degree increments (30, 45, 60, 90, etc?)", 60));
for(i=0; i<nSel; i++)
{
randomAngle = Math.floor(Math.random()*360);
rotationAngle = randomAngle - (randomAngle % increment);
aSel[i].rotate(rotationAngle, rotationAngle);
}
// end of script
... View more