EDIT: added 'select(nf);' so all new bodies are selected for easy translation.
Code: Select all
int n = queryNumericValue("Total object count: ", 12);
bool ortho = queryYesNo("Ortho positioning?");
if ( n < 2 )
print("Please enter a value greater than 2");
else {
body [] bf = getSelectedBodies();
float angle = 360 / n;
for (int i = 1; i < n; i++) {
body[] nf = duplicate(bf);
select(nf);
if (ortho) rotate(nf, 1,-dr(i*angle)); // keeps the rotation placement orthogonally aligned
rotate(nf, 0, dr(i*angle));
}
}