How to produce a volumetric plot of spherical volume
5 views (last 30 days)
Show older comments
Hi!
I want to know how to produce a volume plot that appears spherical. An example of such a plot is seen in Figure 1 in this article: http://iopscience.iop.org/0004-637X/701/1/642/fulltext/
Here is a simple piece of example-code of what I have so far:
[theta,r,phi] = meshgrid(1:1:100, 1:2:180, 1:2:360);
vol = -r.^2 - theta./phi;
figure(1); sh1 = slice(theta,r,phi,vol,50,50,50); set(sh1,'edgecolor','none');
This figure shows the slices of the volume, but I want this volume to appear spherical... so I try:
figure(2); [x,y,z] = sph2cart(theta,phi,r); sh2 = slice(x,y,z,vol,50,50,50); set(sh2,'edgecolor','none');
This doesn't work... How can I achieve this? Any help will be appreciated!
Thanks
0 Comments
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!