POV-Ray : Newsgroups : povray.general : Plotting the d-orbitals : Plotting the d-orbitals Server Time
29 Jul 2024 00:28:46 EDT (-0400)
  Plotting the d-orbitals  
From: Schrodinger
Date: 31 Aug 2013 17:25:00
Message: <web.52225ef7bb284a12b26079110@news.povray.org>
I have been trying to plot the d-orbitals for a while on pov-ray because I like
the better quality. To plot the d-orbitals I used the square of the real
component of the spherical harmonic. For l = 2 and m = 2 the spherical harmonic
is Y_{2,2} = \sqrt{15/32\pi}e^{i2\phi}\sin ^2(\theta). Thus we would be plotting
[Re(Y_{2,2}(\theta,\phi))]^2. The povray code I have thus far looks like this.

#include "colors.inc"
#include "functions.inc"

#declare R = 50;
#declare Z = 3;
#declare a = 0.329;
background { color White }

camera { location  <2*R, 2*R, 2*R> look_at <0, 0, 0>}

light_source {<100,100,100> color White}

#declare zAxis = cylinder {
 <0,0,100>,<0,0,-100>,5
  pigment { color Black }
}

#declare Y22 = function {
cos(2*(f_ph(x,y,z)))*(sin(f_th(x,y,z)*sin(f_th(x,y,z)))) }

isosurface {
  function { Y22(x,y,z) }
        //max_gradient 3500
        threshold 0.1
        contained_by{sphere{0,R}} open
        pigment { color Blue transmit 0}
}

This kind of looks like a d-orbital with the four lobes but it is still not
right. First the tops of the four lobes are open rather than round and the
spacing should be greater between them so there are actually angular nodes.
Right now I'm not sure if this is a problem with povray's internal functions
that I used in the equation or my math or both. Anyone have some Idea were I'm
going wrong here? I know there is a built in function to plot a d_{z^2} orbital
and I would like the results to look like that however I cannot find the code
that is used to produce it anywhere to use as a reference.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.