|
![](/i/fill.gif) |
> dear users
> i installed POV-Ray on a linux machine and it will be nice if somebody helps me
> with the question below
>
> i have a txt file containing spherical particle positions (x,y and z) and i want
> to produce a 3 -dimensional image from this txt file
>
> i just started using POV Ray today and i think we need to produce two files with
> extension *.ini and *.pov from the text file of positions
>
> thanks for the help
> regards
> anki
>
>
>
In your text file, are the values separated by comas or by spaces?
In the first case, a simple #while loop is all you need to read those
values.
If you don't know how many elements are in the file, you can use
#while(!eof <file>).... #end to read untill you reatch the end of the
text file. In that case, you read the first 3 values before you start
the loop, and you read the next 3 as the last instruction of the loop,
just before the #end.
In the second case, it's beter to do a search and replace to replace the
spaces by comas.
The text file is not used to generate the *.ini nor the *.pov file. The
*.pov file will use the *.txt file as a data source.
The *.pov file is the one actualy describing the scene: camera location
and caracteristics, light(s) location(s) intensity and colours, what
objects to place at each locations with what texture,... In the *.pov
file, you will read your data and construct the scene from that.
The *.ini file is optional. You can render the *.pov file directly from
the command line:
<path>pvengine.exe file.pov
You can add the image's dimentions the same way, just add +w1025 +h768
to get a 1024 by 768 pixels image.
The *.ini file is mostly usefull when you need to enter several
arguments and it becomes unweldy to always write them on the command
line. It's also very usefull when doing animations as Simon proposed
with his sample.
You can have a *test.ini to do the test renders, then a *.ini or
*final.ini file to render the final image. Both versions refers to the
same *.pov file.
The test version will have smaler resolution and lower, or no, aa,
possibly lower quality setting, less animation frames,...
The final version will use full quality, good aa, larger resolution, all
the animation's frames,...
Alain
Post a reply to this message
|
![](/i/fill.gif) |