# visualization of 3D probability flow

I have a master equation for $P(N_A^+,N_B^+,N_C^+,t)$, with $N_A^+,N_B^+,N_C^+$ all discrete. The numerical integration is done by this Matlab program using Euler's method. Despite the crude Euler's method, the results from numerical integration are in agreement with the simulation, so the correctness of the program is not the focus.

I want to see how $P(N_A^+,N_B^+,N_C^+,t)$ evolves over time. Since $P(N_A^+,N_B^+,N_C^+,t)$ has 3 more coordinates in addition to time, it is really hard to visualize the changes. Ideally, I want to have something like

But I cannot find any function in Matlab that can does something similar. The closest thing I can find is Matlab's contourslice function.

By running the Matlab program mentioned above with

ABC_driver(0.5,100,20,200,10,true);


you will get something like the following:

You can guess what happens to $P(N_A^+,N_B^+,N_C^+,t)$, but it is nowhere as obvious as the atomic orbital graph.

My question is, how can I plot $P(N_A^+,N_B^+,N_C^+,t)$ in way similar to the atomic orbital density plot? Or can anyone suggest better way to visualize the time evolution of $P(N_A^+,N_B^+,N_C^+,t)$?

• Cool plot! Where did that come from? Mar 2 '14 at 19:29
• @meawoppl, the upper plot comes from here, the lower 6 plots are from contourslice in Matlab.
– wdg
Mar 3 '14 at 3:11
• dead link, fixed one here
– bhbr
Aug 14 '19 at 20:22

## 2 Answers

There is a nice volume rendering toolbox for MATLAB:

http://www.mathworks.com/matlabcentral/fileexchange/22940-vol3d-v2

I think you could tweak it for your purposes.

• looks very useful!
– wdg
Feb 28 '14 at 12:30
• I would encourage those in Python land with the same questions to checkout out mayavi2: docs.enthought.com/mayavi/mayavi Mar 2 '14 at 19:29

Programs like Visit and Paraview can do "volume rendering", which is what you show in your figure. You just need to export the data you have in a format that either of these programs can read.