Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[TetrahedralGraph] - mathematica

  1. Sep 9, 2010 #1
    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.
     
  2. jcsd
  3. Sep 9, 2010 #2

    Hepth

    User Avatar
    Gold Member

    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 (Text):
    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
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook