[TetrahedralGraph] - mathematica

  • Context: Mathematica 
  • Thread starter Thread starter jemma
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on using Mathematica's DiscreteMath`Combinatorica` package to create and manipulate a Tetrahedral Graph. Users can generate the graph with the command ShowGraph[TetrahedralGraph] and overlay data points at specific coordinates corresponding to the tetrahedron's vertices. The participant seeks assistance with layering and rotation techniques, specifically utilizing the Rotate[blah, pi/2] function to adjust the graph's orientation. The provided code snippets demonstrate how to label the vertices using GraphData["TetrahedralGraph", "AllVertexCoordinates"].

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of the DiscreteMath`Combinatorica` package
  • Knowledge of 3D graphics manipulation in Mathematica
  • Basic concepts of graph theory and tetrahedral geometry
NEXT STEPS
  • Explore advanced features of the DiscreteMath`Combinatorica` package
  • Learn about 3D graphics functions in Mathematica, such as Graphics3D
  • Investigate the use of Graphics[Text[...]] for custom labeling in Mathematica
  • Study the application of rotation transformations in 3D graphics
USEFUL FOR

This discussion is beneficial for Mathematica users, mathematicians, and data visualization specialists interested in graph theory and 3D graphical representations.

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 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K