Writing Lists to files
- To: mathgroup at yoda.physics.unc.edu
- Subject: Writing Lists to files
- From: rlove at raptor.rmnug.org (Robert B. Love )
- Date: Fri, 11 Mar 94 10:53:18 -0700
Mathgroupers,
How do I write a graphics object to a file and later read it back in?
I have a large set of 3D objects I draw frequently. The way I was
doing this was to read in the raw data into lists, map functions onto
the maps to change coordinate systems, feed each list into
ScatterPlot3D and Show it. This was time consuming. So I tried
changing my strategy to try to save the list of Graphics3D objects to
a file one time and then read that back in as needed.
I now have a function to process the raw data, make Graphics3D lists
and write it to a file, and a function to read it back in and render
it. It works only as long as I have the same MMA session going. If
I come back another day, I can't just use the file produced by the
write function. I have to execute it in this session and then read
it. The error when I try to show what I've read in is "Symbol is a
type of graphics". Yet if I look at the file that was written it
looks like:
{Graphics3D[Line[{{-0.1074786999302791, 0.0001500686726859751,
-0.994207376024082}, {-0.0987432588630104,
-0.003310157494793516,
So it is graphics. How do I fix this?