POV-Ray : Newsgroups : povray.text.scene-files : Help with converting electron scattering CASINO to povray : Re: Help with converting electron scattering CASINO to povray Server Time
3 Feb 2023 14:41:54 EST (-0500)
  Re: Help with converting electron scattering CASINO to povray  
From: Bald Eagle
Date: 1 May 2019 15:20:01
Message: <web.5cc9f122fe5830474eec112d0@news.povray.org>
"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

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