3D plot

*Subject*: [mg2245] 3D plot*From*: vecoven at montefiore.ulg.ac.be (Frederic Vecoven)*Date*: Wed, 18 Oct 1995 05:55:10 GMT*Approved*: usenet@wri.com*Distribution*: local*Newsgroups*: wri.mathgroup*Organization*: Universiti de Lihge*Sender*: daemon at wri.com ( )

I have a problem with plotting something special... First, I have a list of points which forms several tetrahedras. The list is the following "x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4", so that's one tetrahedra per line. I have found an easy way to plot the tetrahedras : tlist = ReadList["filename",{Number,Number,Number},RecordLists->True]; faces = Complement[Range[4],{#}]& /@ Range[4] MakeTetrahedron[vertexlist_] := Polygon[Part[vertexlist,#]]& /@ faces object3d = MakeTetrahedron /@ tlist Show[Graphics3D[object3d,BoxRatios->{1,1,1}]] and this works fine. Now, THE PROBLEM is that I now work with hexahedras.... and that I have 2 files. The first file are all points coord., so that's "x1 y1 z1". The number of the line is the number of the points. As you may imagine, the second file is "n1 n2 n3 n4 n5 n6 n7 n8", which represents the 8 numbers of the points which form the hexahedra... My problem is that I can read the 2 lists, but I have problems to switch "n2" to "x2 y2 z2"... Can somebody help me ? -Fred -- \__/ \__/ *********************************************** (@@) (@@) * Frederic Vecoven - Researcher * //||\\ //||\\ * Department of microelectronics * * Institut Montefiore B28 - 4000 Liege * \__/ \__/ \__/ * University of Liege - Belgium * (oo) (oo) (oo) * Phone: (32)-41-662712 Fax: (32)-41-662950 * //||\\ //||\\ //||\\ * * * E-mail : vecoven at montefiore.ulg.ac.be * FIGHTER CAPTURED ! * http://www.montefiore.ulg.ac.be/~vecoven/ * ***********************************************