Skip to content

Instantly share code, notes, and snippets.

@JokerMartini
Created December 17, 2015 15:20
Show Gist options
  • Save JokerMartini/1b33f5e1b41036864f3d to your computer and use it in GitHub Desktop.
Save JokerMartini/1b33f5e1b41036864f3d to your computer and use it in GitHub Desktop.
Maxscript: Demonstrates how to display any number of objects in a grid like format with spacing for both columns and rows.
rowMax = 10
rowSpacing = 30
columnSpacing = 40
delete objects
for row = 0 to 9 do
(
for column = 0 to 19 do
(
posx = rowSpacing * row
posy = columnSpacing * column
posz = 0
sphere radius:10 pos:[posx,posy,posz] wirecolor:red
)
)
row = 0
column = 0
for index = 0 to 35 do
(
posx = rowSpacing * row
posy = columnSpacing * column
posz = 0
sphere radius:10 pos:[posx,posy,posz] wirecolor:red
row += 1
if row > rowMax do
(
row = 0
column += 1
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment