Created
December 17, 2015 15:20
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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