Student Support Forum: 'An Array of Cuboids' topicStudent Support Forum > General > "An Array of Cuboids"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response Michael 12/09/12 08:43am 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.) URL: ,

 Subject (listing for 'An Array of Cuboids') Author Date Posted An Array of Cuboids Strelok 12/05/12 09:45am Re: An Array of Cuboids Bill Simpson 12/05/12 1:25pm Re: Re: An Array of Cuboids Strelok 12/06/12 05:22am Re: Re: Re: An Array of Cuboids Bill Simpson 12/09/12 00:30am Re: Re: Re: An Array of Cuboids Michael 12/09/12 08:43am
 < Previous Comment Help | Reply To Comment | Reply To Topic