POV-Ray : Newsgroups : povray.newusers : Possible to use coordinates from an external text file? : Re: Possible to use coordinates from an external text file? Server Time
23 Apr 2024 13:21:56 EDT (-0400)
  Re: Possible to use coordinates from an external text file?  
From: TomB
Date: 22 Oct 2015 10:25:00
Message: <web.5628f1462a4ca8dd81763ba0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "TomB" <nomail@nomail> wrote:
>
> >
> > I would like to know if it is possible to read in coordinates from an external
> > text file. For example, if I want to create a number of spheres at coordinates
> > [x,y,z], but these coordinates are stored in another file...
>
> The #read directive in POV-Ray is quite useful and powerful for this kind of
> thing. A possible stumbling-block is that your text file may not be in a form
> that's immediately readable, as the #read directive requires a certain kind of
> formatting. But that's fixable in any word-processing app (I use Edit Pad Lite
> for this, to do any global search-and-replace of things that #read doesn't
> handle well, liked tabbed white space for example.)
>
> I would suggest trying to #read in your text file as-is, as a first try. It will
> either work or it won't ;-) If it doesn't, then you'll need to 'massage' it
> until it does. (That's a good learning exercise in itself!)


Thank you both for your helpful replies. This function is exactly what I was
looking for.


Post a reply to this message

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