|
![](/i/fill.gif) |
I use balls with various colors that should be changed frequently based on
the ball's property such as energy (ball = atom). How do I do that?
The following code reads the file consisting of three coordinates x,y,z of
atoms and draws the balls. However, I need to use a 4th variable, e.g.
energy, E and read the following string:
x,y,z,E
and then somehow use E as a feature to change the color of an atom. How do I
do that?
#while (defined(MyFile))
#read (MyFile, MyVectX, MyVectY, MyVectZ)
#declare MyVect = <MyVectX, MyVectY, MyVectZ>;
sphere {MyVect, 1 texture {pigment {color rgb <a,b,c>}}}
#end
#fclose MyFile
Can I automatically define and declare three constants a,b,c?
thanks
Post a reply to this message
|
![](/i/fill.gif) |