Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

3D imaging

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109577] 3D imaging
  • From: eric g <eric.phys at gmail.com>
  • Date: Thu, 6 May 2010 04:51:21 -0400 (EDT)

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.];
    ]
   ]
  ]


  • Prev by Date: NDSolve backward in time
  • Next by Date: Re: A question about saving figures from Mathematica 7
  • Previous by thread: Re: NDSolve backward in time
  • Next by thread: FrontEnd and bash automatization