POV-Ray : Newsgroups : povray.general : Plotting the d-orbitals Server Time
25 Nov 2024 17:40:41 EST (-0500)
  Plotting the d-orbitals (Message 1 to 3 of 3)  
From: Schrodinger
Subject: Plotting the d-orbitals
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

From: Le Forgeron
Subject: Re: Plotting the d-orbitals
Date: 1 Sep 2013 02:55:15
Message: <5222e4d3$1@news.povray.org>
Le 31/08/2013 23:24, Schrodinger nous fit lire :
> 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.

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

beware, the ratio of the camera is not adapted to the resolution, it
might distort/compress the view.

Consider adding before look_at:

direction -z
up y
right image_width/image_height*x

> 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.

If it's open, maybe you are looking to only a part of it. scale it down...
but indeed, there is no part of your function that depend on r, so it's
just describing an infinite fold.

(f_ph is the Phi elevation/latitude of polar coordinate, f_th is the
longitude, in a sphere/earth with the pole at +/-y ; where is f_r )

From old thread in povray.advanced-users, 13 December 2001, Mike Williams:

> One of the d orbitals is available as the f_quantum(x,y,z,0) function.
> 
> #include "functions.inc"
> isosurface {
>   function {f_quantum(x,y,z,0)}
>         max_gradient 2
>         contained_by {sphere {0,8}}
>         pigment {rgb 1}
> }

but it's the d_z² orbital and it would need a "scale R/8" to match your
scene.


Post a reply to this message

From: William F Pokorny
Subject: Re: Plotting the d-orbitals
Date: 1 Sep 2013 08:07:16
Message: <52232df4$1@news.povray.org>
On 09/01/2013 02:55 AM, Le_Forgeron wrote:
> Le 31/08/2013 23:24, Schrodinger nous fit lire :
>
I'll add, if after exact relative spacings as viewed, try the 
orthographic camera instead of the default perspective one.


Post a reply to this message

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