<br><font size=2 face="sans-serif"> This is my first
experience posting to the ParaView Mailing List; as well as my first project
I am exploring with ParaView. I hope I am posting this question to
the correct audience.</font>
<br>
<br><font size=2 face="sans-serif"> I am attempting
to create an animation of our Solar System - at an extremely high update
interval - perhaps plotting the position and velocity of significant solar
system bodies over 165 Earth years at</font>
<br><font size=2 face="sans-serif">a one day interval. Initially
I thought I would be able to work with CSV files to define a dataset which
includes time, positional coordinates, and velocity vectors. While
testing this approach I managed to use the TableToPoints filter to create
a visualization of a sample dataset; but I was not able to sequence over
the individual timesteps. So in effect you see all the positions
a particular planet was at for the entire duration of the dataset.</font>
<br>
<br><font size=2 face="sans-serif">I created a video of this test and made
it available online:</font>
<br><font size=2 face="sans-serif"> </font><a href="http://www.youtube.com/watch?v=XLPxx-2Zc9Q"><font size=3 color=blue><u>http://www.youtube.com/watch?v=XLPxx-2Zc9Q</u></font></a><font size=3>
</font>
<br>
<br><font size=3> Next I thought perhaps the CSV format
was a little too general for what I needed, so I read the VTK file format
document and migrated over to the XML VTK format. It seems like there
is no way to define time sequenced data natively within the file format
itself? ParaView expects the user to break the timesteps into individual
files - with a numeric indicator in the filename to define the sequence.
If I were to take this approach, I could be looking at creating nearly
500,000 individual files to represent the entire duration of time I'm interested
in plotting. I feel like there must be a better way to do this.</font>
<br>
<br><font size=3> As a small improvement I thought I
could at least combine all of the unique solar system bodies (Earth, Sun,
etc.), into a single timestep file such as this:</font>
<br><font size=3> (filename: timeseries_2455562.vtu)</font>
<br>
<br><font size=2 face="Lucida Console"><?xml version="1.0"?></font>
<br><font size=2 face="Lucida Console"><VTKFile type="UnstructuredGrid"
version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"></font>
<br><font size=2 face="Lucida Console"> <UnstructuredGrid></font>
<br><font size=2 face="Lucida Console"> <Piece NumberOfPoints="2"
NumberOfCells="2"></font>
<br><font size=2 face="Lucida Console"> <PointData
Vectors="Velocity" Scalars="Radius"></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="Time" type="Float32" format="ascii">2455562
2455562</DataArray></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="Radius" type="Float32" format="ascii">6371
696000</DataArray></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="Velocity" type="Float32" NumberOfComponents="3"
format="ascii"></font>
<br><font size=2 face="Lucida Console">
-2.982651603443954E+01 -5.304542013817379E+00 -7.226846229160870E-04</font>
<br><font size=2 face="Lucida Console">
0 0 0</font>
<br><font size=2 face="Lucida Console"> </DataArray></font>
<br><font size=2 face="Lucida Console"> </PointData></font>
<br><font size=2 face="Lucida Console"> <Points></font>
<br><font size=2 face="Lucida Console"> <DataArray
type="Float32" NumberOfComponents="3" format="ascii"></font>
<br><font size=2 face="Lucida Console">
-2.567030301930377E+07 1.448508985971261E+08 -3.607762965630511E+03</font>
<br><font size=2 face="Lucida Console">
0 0 0</font>
<br><font size=2 face="Lucida Console"> </DataArray></font>
<br><font size=2 face="Lucida Console"> </Points></font>
<br><font size=2 face="Lucida Console"> <Cells></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="connectivity" type="Int32" format="ascii">0
1</DataArray></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="offsets" type="Int32" format="ascii">1
2</DataArray></font>
<br><font size=2 face="Lucida Console"> <DataArray
Name="types" type="UInt8" format="ascii">1
1</DataArray></font>
<br><font size=2 face="Lucida Console"> </Cells></font>
<br><font size=2 face="Lucida Console"> </Piece></font>
<br><font size=2 face="Lucida Console"> </UnstructuredGrid></font>
<br><font size=2 face="Lucida Console"></VTKFile></font>
<br>
<br><font size=3>The idea of this approach was to list all of the scalars
and vectors for each corresponding body in a single file. In this
example the first listed scalar, vector, or coordinate point, is the Earth
while the second set of values indicates the Sun's data. By combining
the bodies into a single file I could reduce the 500,000 files required
down to some 60,000 files....still undesirable but better.</font>
<br>
<br><font size=3>However I would also like to segment the Points once inside
the ParaView environment; so I can create a distinct pipeline for each
body in the dataset. One application for this would be to allow different
Glyph rendering rules for the Sun and the Earth so I can make the Sun...have
a Sun texture - and the Earth an Earth texture. </font>
<br>
<br><font size=3>After experimenting with this for awhile I found myself
trying to implement a Programmable Filter. The filter would take
the Unstructured Grid for the given timestep, and given an index, extract
the Point, Scalar, and Vector data from its input - then set only those
values to the Output Unstructured Grid. I currently have a script
that looks something like this:</font>
<br>
<br><font size=2 face="Lucida Console"># CELLID 0 = EARTH</font>
<br><font size=2 face="Lucida Console">cellId = 0</font>
<br>
<br><font size=2 face="Lucida Console"># Obtain References To Input/Output
Data</font>
<br><font size=2 face="Lucida Console">gridI = self.GetUnstructuredGridInput()</font>
<br><font size=2 face="Lucida Console">gridO = self.GetUnstructuredGridOutput()</font>
<br><font size=2 face="Lucida Console">dataI = self.GetInput()</font>
<br><font size=2 face="Lucida Console">dataO = self.GetOutput()</font>
<br><font size=2 face="Lucida Console">scalarI = dataI.GetPointData().GetScalars()</font>
<br><font size=2 face="Lucida Console">vectorI = dataI.GetPointData().GetVectors()</font>
<br>
<br><font size=2 face="Lucida Console"># Initialize Local Storage Arrays</font>
<br><font size=2 face="Lucida Console">newVector = vtk.vtkFloatArray()</font>
<br><font size=2 face="Lucida Console">newVector.SetName(vectorI.GetName())</font>
<br><font size=2 face="Lucida Console">newVector.SetNumberOfComponents(3)</font>
<br><font size=2 face="Lucida Console">newScalar = vtk.vtkFloatArray()</font>
<br><font size=2 face="Lucida Console">newScalar.SetName(scalarI.GetName())</font>
<br><font size=2 face="Lucida Console">newPoint = vtk.vtkPoints()</font>
<br><font size=2 face="Lucida Console">newPoint.SetNumberOfPoints(1)</font>
<br><font size=2 face="Lucida Console">newCell = vtk.vtkCellArray()</font>
<br>
<br><font size=2 face="Lucida Console"># Lookup CellId References</font>
<br><font size=2 face="Lucida Console">idCell = gridI.GetCell(cellId)</font>
<br><font size=2 face="Lucida Console">idCellType = gridI.GetCellType(cellId)</font>
<br><font size=2 face="Lucida Console">idPoint = gridI.GetPoints().GetPoint(cellId)</font>
<br><font size=2 face="Lucida Console">idScalar = scalarI.GetTuple(cellId)</font>
<br><font size=2 face="Lucida Console">idVector = vectorI.GetTuple(cellId)</font>
<br>
<br><font size=2 face="Lucida Console"># Populate New Local Cell Array
with CellId Cell</font>
<br><font size=2 face="Lucida Console">newCell.InsertNextCell(idCell)</font>
<br>
<br><font size=2 face="Lucida Console"># Populate New Local Point Array
With CellId Point</font>
<br><font size=2 face="Lucida Console">newPoint.SetPoint(0, idPoint)</font>
<br>
<br><font size=2 face="Lucida Console"># Populate New Local Scalars with
CellId Scalar Tuples</font>
<br><font size=2 face="Lucida Console">newScalar.InsertNextTuple(idScalar)</font>
<br>
<br><font size=2 face="Lucida Console"># Populate New Local Vectors with
CellID Vector Tuples</font>
<br><font size=2 face="Lucida Console">newVector.InsertNextTuple(idVector)</font>
<br>
<br><font size=2 face="Lucida Console"># Copy Local Cells, Scalars, Vectors,
and Points Into Output Pipeline Data</font>
<br><font size=2 face="Lucida Console">gridO.SetPoints(newPoint)</font>
<br><font size=2 face="Lucida Console">gridO.SetCells(idCellType, newCell)</font>
<br><font size=2 face="Lucida Console">dataO.GetPointData().SetScalars(newScalar)</font>
<br><font size=2 face="Lucida Console">dataO.GetPointData().SetVectors(newVector)</font>
<br>
<br><font size=2 face="sans-serif">The filter does achieve the desired
effect for the cellID 0 - but when I switch the value of cellID to 1 (which
should refer to the Sun's index) ParaView crashes hard - where I assume
I am missing something, possibly requesting something out of bounds in
memory.</font>
<br>
<br><font size=2 face="sans-serif">I've been struggling with this problem
for a little while now and thought to share my progress here; hopefully
there is somebody out there with a little more insight that could help
guide me towards either a conclusion with this implementation or a suggestion
for a better approach.</font>
<br>
<br><font size=2 face="sans-serif">Essentially - How can one give ParaView
Point and Velocity vectors over a vast sequence of time without creating
potentially hundreds of thousands of files on disc? Does this Programmable
Filter seem like a reasonable approach? Is there a native feature
I am missing that does this already? Is there some other file format
other than VTK I could use to have ParaView understand this format of data?</font>
<br>
<br><font size=2 face="sans-serif">Any thoughts, comments, or questions
will be greatly appreciated. :)</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif"> John</font>
<br>