[TetrahedralGraph] - mathematica

  • Mathematica
  • Thread starter jemma
  • Start date
  • Tags
    Mathematica
In summary, the use of the code << DiscreteMath`Combinatorica` and ShowGraph[TetrahedralGraph] in Mathematica produces a regular Tetrahedral Graph. It is possible to show data points with specific coordinates on this graph by using the labels = Table[Graphics[Text[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]], GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]]]], {i, 1, Length[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]]]}] and Show[labels] commands. However, there may be some difficulty with layering or rotation
  • #1
jemma
36
0
Using the following code in mathematica:

<< DiscreteMath`Combinatorica`
ShowGraph[TetrahedralGraph]

Produces a regular Tetrahedral Graph. I would like to show data points on this tetrahedral graph with specific coordinates relating to the four points of the tetrahedron. Is this possible?

Thanks if you can help.
 
Physics news on Phys.org
  • #2
Haven't been able to get it perfect for the layering or rotation, I know you can use "Rotate[blah,pi/2]" for each to turn it, and then the whole thing. But the coordinates are in the graphdata:
Code:
labels = Table[Graphics[Text[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]], GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]]]], {i, 1, Length[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]]]}]

Show[labels]

or

labels = Table[Graphics[Text[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][], GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][]]], {i, 1, Length[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]]]}]
Show[labels]
ill work for a few more minutes on it
 

Related to [TetrahedralGraph] - mathematica

1. What is a TetrahedralGraph in Mathematica?

A TetrahedralGraph in Mathematica is a type of graph that is composed of tetrahedrons, which are three-dimensional shapes with four triangular faces. In this graph, each tetrahedron represents a vertex and the edges connect the vertices together.

2. How do I create a TetrahedralGraph in Mathematica?

To create a TetrahedralGraph in Mathematica, you can use the function TetrahedralGraph[n], where n is the number of tetrahedrons you want in the graph. This will create a graph with n vertices and n(n-1)(n-2)/6 edges.

3. Can I customize the appearance of a TetrahedralGraph in Mathematica?

Yes, you can customize the appearance of a TetrahedralGraph in Mathematica by using the various options available in the function. Some options include specifying the color of the edges and vertices, the size of the graph, and the layout of the tetrahedrons.

4. How can I perform operations on a TetrahedralGraph in Mathematica?

You can perform various operations on a TetrahedralGraph in Mathematica using built-in functions such as VertexList, EdgeList, and AdjacencyMatrix. These functions allow you to access the data of the graph and perform calculations or manipulations on it.

5. Are there any applications of TetrahedralGraphs in real life?

Yes, TetrahedralGraphs have various applications in real life, particularly in chemistry and molecular biology. They can be used to represent the molecular structure of compounds and study their properties. They are also used in computer graphics and game development to create 3D models and animations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
486
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
331
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top