|
|
He everyone,
I am a new user on povray. Recently I try to draw some atomic structure by
importing two file externally, labeling each atomic position. However, since I
am working on some multi-component system, I would like to color each type of
sphere by different color, in which the color of the sphere depend on the radius
of the species.( eg. I have 3 type of sphere, in total there are 2000 of them)
How can I achieve this?
Thanks so much!!!!
Post a reply to this message
|
|
|
|
On 09/11/2013 12:09 AM, yinfunglo5063 wrote:
> He everyone,
>
> I am a new user on povray.
...
> How can I achieve this?
>
> Thanks so much!!!!
>
>
Hi yinfunglo5063 and welcome.
You have posted in the wrong newsgroup and your question will probably
not be seen by those who could help you. Try povray.newusers
There are several ways of doing what you want. If you use a variable for
the radius, try using the #switch directive:
#declare Rad_Val = 10.00 ; // Your radius variable
sphere {
0.0, Rad_Val
texture{
#switch (Rad_Val)
#case( 10 )
_texture_1
#break
#case( 15 )
_texture_2
#break
#case( 20 )
_texture_3
#break
#else
_texture_0
#break
#end
}
}
Where _texture_0 to _texture_4 have been declared earlier.
--
Regards
Stephen
Post a reply to this message
|
|