Consider the following list in mathematica:
a = {
{
{0, 0, 0}, {1, 0, 0}, {1, 1, 0}
},
{
{0, 0, 1}, {1, 0, 1}, {1, 1, 1}
}
};
Now, invoke:
Export["test.dat", a]
and then
b = Import["test.dat"]
You will see that at the end a
doesn't equal b
. Should I consider this as a feature or a bug?
Furthermore, I would like to import a list having the following format: {P1,P2,P3...,Pn}
where Pi={v1,v2,v3,...,vm}
and each vi={x,y,z}
where x,y,z
are numbers representing the coordinates of the vertex vi
. This should be a list of polygons.
How should I set my .dat
file so I can read it with Mathematica, and how should I read it? I tried to imitate the output of Export["test.dat",a]
above, but then I discovered the other issue. I found this question, but couldn't make the answer work for me...
Any ideas? Thanks in advance!