Mathematica 9 is now available
Student Support Forum
Student Support Forum > General > > "An Array of Cuboids"

Post Reply:
Email Address:

Please send email when my message is replied to.

Url (optional):
Message: view original message?
Attachment (optional):
Please answer this:4+5 =

Original Message (ID '162776') By Michael:
In Response To 'Re: Re: An Array of Cuboids' --------- Try baseCoords = RandomSample[Tuples[Range[5]/6., 3], 5^3]; Manipulate[ Graphics3D[ Table[{RGBColor @@ p, Opacity[.75], Cuboid[p, p + .15]}, {p, Take[baseCoords, n]}], PlotRange -> Table[{1/6 - 1/60, 1}, {3}]], {n, 1, 5^3, 1}, Button["shuffle", baseCoords = RandomSample[Tuples[Range[5]/6., 3], 5^3]] ] Manipulate will display any expression, and re-display the expression any time its variables are changed. (I modified Bill's way of getting the coordinates, so I could randomize the order and take the first n of them.)