Creating a 3D surface by multiplying radial and angular components
1 view (last 30 days)
Show older comments
Hi there,
I'm fairly new to MATLAB and could really use some help.
I'm trying to create a 3D surface of atomic orbitals, but I'm having trouble both multiplying the radial component with the angular component, as well as displaying it.
The radial component is the probability of finding the electron from the radius, regardless of direction. I've solved that and it's a distribution like this (focusing on the 2p):

I'm having trouble multiplying that by the angular component, which should give a 3D surface:

The main question is how to I multiply these a radial (distance) component with an angular component to make a 3D object? Moving from spherical to Cartesian coordinates is quite tricky.
This is what I have so far for the Pz orbital (assuming [P2p] is a single row of values for the distribution of Np length):
limit = 10;
x_siz = linspace(-limit, limit, Np);
y_siz = linspace(-limit, limit, Np);
z_siz = linspace(-limit, limit, Np);
%probability densities
psi = @(r,theta,phi) P2p .* sqrt(3/(4*pi))*cos(theta) %Radial * Angular
%configuring the range
[x y z] = meshgrid(x_siz,y_siz, z_siz);
%[THETA,PHI] = cart2sph(x,y,z);
%create array of probability density magnitudes
psi_210_vals = pd_psi_210(x,y,z);
%plotting
isosurface(x_siz,y_siz,z_siz, psi_210_vals, 0.004);
axis equal
It should ultimately look like this:

0 Comments
Answers (0)
See Also
Categories
Find more on 2-D and 3-D 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!