From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Wed May 26 2004 - 01:01:05 CDT

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>

-- 
=======================================================================
Dr. Axel Kohlmeyer                        e-mail: axel.kohlmeyer_at_rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================