Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

3D plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2245] 3D plot
  • From: vecoven at montefiore.ulg.ac.be (Frederic Vecoven)
  • Date: Wed, 18 Oct 1995 01:55:10 -0400
  • Organization: Universiti de Lihge

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/   *
                                   ***********************************************
  


  • Prev by Date: Re: Deleting more subtle then Clear[ ] ?
  • Next by Date: Re: Re: Constructing Expressions from List Elements
  • Previous by thread: 3D plot
  • Next by thread: 3D Plot