Mathematica [TetrahedralGraph] - mathematica

  • Thread starter Thread starter jemma
  • Start date Start date
  • Tags Tags
    Mathematica
AI Thread Summary
The discussion focuses on displaying data points on a regular Tetrahedral Graph in Mathematica using the DiscreteMath`Combinatorica` package. The user seeks assistance in accurately positioning these data points according to the tetrahedron's coordinates. They mention challenges with layering and rotation, noting the use of the "Rotate" function to adjust the graph's orientation. The user provides code snippets for generating labels based on the tetrahedral graph's vertex coordinates, indicating an attempt to visualize these points effectively. Further exploration and refinement of the code are ongoing to achieve the desired outcome.
jemma
Messages
35
Reaction score
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
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
 

Similar threads

Replies
4
Views
3K
Replies
5
Views
3K
Replies
4
Views
1K
Replies
4
Views
2K
Replies
18
Views
4K
Replies
13
Views
2K
Replies
1
Views
3K
Back
Top