|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi. I have a dozen of these files, which are the output of the CASINO program
for the simulation of electron scattering in a solid of SiO2. These can be very
beautiful (see images at https://www.google.com/search?q=casino+electron ), but
the paths are often rendered in ugly, one-pixel-wide trails.
I want to render in povray, turning each Trajectory into a spline or a series of
cylinders. Once I get a series of arrays defined properly in povray SDL, I'm
good to go. I believe I have the skills to use Notepad++ to make most of the
modifications, then do some typing by hand per trajectory. But the problem is
there are 200 trajectories, each with a different number of segments, and I have
a dozen files. Also, this low energy simulation only has about 20 points. Some
of the high energy ones have over 300!
Any tips? (Feel free to use this file any way you see fit).
Hello! The email I use everyday, for old povray friends, is this
use### [at] gmailcom
Post a reply to this message
Attachments:
Download '0p5kvsio2f.dat.txt' (468 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"gregjohn" <pte### [at] yahoocom> wrote:
> Hi. I have a dozen of these files, which are the output of the CASINO program
> for the simulation of electron scattering in a solid of SiO2. These can be very
> beautiful (see images at https://www.google.com/search?q=casino+electron ), but
> the paths are often rendered in ugly, one-pixel-wide trails.
>
> I want to render in povray, turning each Trajectory into a spline or a series of
> cylinders. Once I get a series of arrays defined properly in povray SDL, I'm
> good to go. I believe I have the skills to use Notepad++ to make most of the
> modifications, then do some typing by hand per trajectory. But the problem is
> there are 200 trajectories, each with a different number of segments, and I have
> a dozen files. Also, this low energy simulation only has about 20 points. Some
> of the high energy ones have over 300!
>
> Any tips? (Feel free to use this file any way you see fit).
>
> Hello! The email I use everyday, for old povray friends, is this
> use### [at] gmailcom
Seems to me you can write a macro to parse your text file.
(Can you change it a CSV format? Maybe with Excel / LibreOffice, etc.?)
Set a counter to 0
Skip the first "Trajectory" and then every time after, increment a counter.
Once you hit "Energy", you start building your array with 5 dimensions.
Use the counter in a macro call that adds a data set to the array.
Stop when you hit
"-----------------------------------------------------------------"
Add that trajectory array to a master array.
Now you have an array of arrays that you can step through, interpolate a spline
for a sphere sweep, instantiate the sphere sweep, and cycle through until all
the trajectories are "plotted".
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Seems to me you can write a macro to parse your text file.
And of course, since POV-Ray can't determine the cast/type of the variable, you
can't parse data that you don't know exactly what format the variables are - and
so you need to know how many records to read.....
So ignore that.
> (Can you change it a CSV format? Maybe with Excel / LibreOffice, etc.?)
I think I might have a way to process the data in LibreOffice/OpenOffice to
generate an include file with the formatted arrays.
But that might take a while since it's been months since I've looked at my
ridiculously complicated spreadsheet from my last job....
So the new plan is to use a 3rd party tool (commercial, or hand-written
C++/C#/whatever) to just strip out anything but the numeric data lines, and make
arrays of all the data sets.
I see what I can do, unless you beat me to it ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I see what I can do, unless you beat me to it ;)
It took me a while to struggle with some of the syntax in LibreOffice, and
puzzle out how to pair INDIRECT() with ADDRESS() so I could specify a cell
range, but I think it should work.
Just needs a minor tweak to make it fully automated (hopefully I'll do that
tomorrow)
Your sample data set gets transformed into and array made of 400 other arrays,
the largest of which has 36 elements.
I sent you an email. :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks all for the consideration. The "fifth" variable is interesting because
it's the energy, and one can see it decrease with increasing collisions... That
could be an interesting color parameter.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|