From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jun 21 2004 - 14:02:54 CDT

Osmany,
  There aren't any graphics commands for drawing objects with
plain RGB triplets. At present all of the drawing commands reference
a VMD color index which is either one of the 16 fixed colors or one of
the 1024 colors forming the color gradient map. In the past the gradient
map is typically sufficient for most purposes, since coloring tends to be
done along some gradient scale, in relation to some scalar atomic or
volumetric property. If you feel strongly that you need raw RGB colors in
draw commands, this is something I could consider adding in a future
version. Let me know if you have more questions about doing this.

  John Stone
  vmd_at_ks.uiuc.edu

On Wed, May 26, 2004 at 08:36:13AM -0400, Osmany Guirola Cruz wrote:
> Thanks for the code Axel
> i have a little experience with OpenGL and whit it i can assign diferent
> colors to vertex and draw lines AND Ngon with a gradient of colors. Can i
> use these properti of OpenGL in VMD. an another question i normally use
> draw color red green etc etc , but can i use something like glcolor3f(R,G,B)
> to draw a line whit a "specifiv color".
> Thanks
> Osmany
>
>
>
> On Wednesday 26 May 2004 02:01 am, Axel Kohlmeyer wrote:
> > On Tue, 25 May 2004, Osmany Guirola Cruz wrote:
> >
> > OG> Hi people
> > OG> How can i read a set of coords. from a file and draw lines whit these
> > OG> for example :
> > OG> i have a lines file:
> > OG>
> > OG> 1 2 3
> > OG> 4 5 6
> > OG> 7 8 9
> > OG>
> > OG> and i want do
> > OG>
> > OG> draw line "1 2 3" "4 5 6"
> > OG> draw line "4 5 6" "7 8 9"
> >
> > hi,
> >
> > how about the following code?
> >
> > ===================================
> >
> > set fp [open "lines.dat" r]
> > set dat1 ""
> > set dat2 ""
> > while { ![eof $fp] } {
> > set dat2 $dat1
> > set dat1 [gets $fp]
> > if { ("$dat1" != "") && ("$dat2" != "") } {
> > draw line $dat1 $dat2
> > }
> > }
> > unset dat1
> > unset dat2
> > close $fp
> > unset fp
> >
> > ====================================
> >
> > axel.
> >
> >
> > OG>
> > OG> i need these to draw lines in my scene trougth certain residues
> > OG>
> > OG>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078