From: eric g on 6 May 2010 04:51 hello group, what is the best way to generate the 3D image or 3D graphics from a 3D matrix. below img is the matrix would like to see in the same sense that ArrayPlot[img[[4, All, All]], ColorFunction -> GrayLevel] will give me the 4th-slide 2D image; or Image[img[[4,All,All]]] best regards, Eric img = Table[Random[]/5., {4}, {256}, {256}]; For[i = 1, i <= 4, i++, For[j = 1, j <= 256, j++, For[k = 1, k <= 256, k++, If[Mod[i, j] == 0 || Mod[i, k] == 0 || Mod[j, k] == 0, img[[i, j, k]] = 1 + Random[]/5.]; ] ] ]
|
Pages: 1 Prev: NDSolve backward in time Next: FrontEnd and bash automatization |