Skip to content

Instantly share code, notes, and snippets.

@lgordon
Created May 31, 2012 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgordon/2840409 to your computer and use it in GitHub Desktop.
Save lgordon/2840409 to your computer and use it in GitHub Desktop.
volume rendering with mathematica
dims = Dimensions@data;
coords = Table[{x, y, z}, {x, 1, dims[[1]]}, {y, 1, dims[[2]]}, {z, 1,
dims[[3]]}];
cubes = {Hue @@ #1, EdgeForm[], Cuboid@#2} &
output = MapThread[cubes, {data, coords}, 3];
Graphics3D@output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment