Message Boards Message Boards

1 Reply
0 Total Likes
View groups...
Share this post:

Help with very simple 3D graphic

Posted 10 years ago
Hi. For my first Mathematica effort I'm trying to model a crystal growth by random-walk diffusion. I'm thinking to have:
- one 3D matrix (apologies if this is the wrong term) with two states for each component, 1 indicating the crystal is present at that co-ordinate, and 0 that it isn't (call this Matrix (x,y,z))
- a second such matrix tracking the next bit of material,
and then do some operations to work out when the next bit of material collides with the crystal and enlarges it.   I'll work this out.

My immediate question is what's the best Mathematica function and syntax to graphically display the grown crystal (i.e. the state of Matrix (x,y,z))? I've been trying to understand the syntax for Plot3D and Graphics3D but haven't quite got there!
POSTED BY: Andrew Ponting
Try using Image3D:
Image3D[{{{1, 0, 1}, {0, 1, 0}, {1, 1, 1}}, {{1, 0, 1}, {0, 1, 0}, {1, 0, 1}}, {{1, 0, 1}, {1, 1, 0}, {1, 0, 1}}}]
What you're basically doing is specifying the pixels of a 3D image, which is a pretty direct translation from the states arranged in a 3D matrix.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract