POV-Ray : Newsgroups : povray.newusers : Electron Density Maps : Re: Electron Density Maps Server Time
2 Jun 2024 14:29:02 EDT (-0400)
  Re: Electron Density Maps  
From: Bald Eagle
Date: 28 Jul 2013 12:55:00
Message: <web.51f54cab5403b75c73fc9ebb0@news.povray.org>
Richard,

A few suggestions that may help you speed up your construction, help you keep
track of it, and reduce confusion:

Define a texture for each of you atom types once, and then reference that.

#declare Nitrogen = texture { pigment { Blue } }

Then, it's easy to change it for ALL nitrogens in the scene.

Also, define the atom locations as variables.

#define Nitrogen_1 = <1, 1, 1>
#define Nitrogen_rad = 0.5

then you can just write
sphere { Nitrogen_1, Nitrogen_rad texture { Nitrogen} }

That will help you keep track of what atoms are what, allow you tweak the radii
of each type of atom, etc.
It might help also to define all of the atoms in your scene as an array.

#declare Atoms = array [4] [4]
{1, Nitrogen_1, Nitrogen_rad, Nitrogen},
{2, Nitrogen_1, Nitrogen_rad, Nitrogen},
{3, Nitrogen_1, Nitrogen_rad, Nitrogen},
{4, Nitrogen_1, Nitrogen_rad, Nitrogen}
}

Keep in mind that arrays start at ZERO and go down rows first and then over
columns.
then you can call then like this:
sphere {Atoms [0][1], Atoms [0][2] texture Nitrogen}
The first number in the array is the atom#, in case you want to label your atoms
in the scene
text { ttf "arial.ttf" concat("N", str(Atoms[0][0],1,1)) .01, 1}

You might also try using blobs for your electron density clouds, as you may get
better color gradients and smoother transitions.  Changing the strength of the
blobs might help you better model the different electron densities by mimicking
the electronegativities.

Nice work so far.
Good luck.


Post a reply to this message

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