0
$\begingroup$

I have seen other people run the following code:

MeshConnectivityGraph[DelaunayMesh[RandomPoint[Disk[], 1000]]]

To generate a planar network (working towards creating a model of larger human networks). I can't get Mathematica to execute this code for me.

DelaunayMesh[RandomPoint[Disk[], 1000]]

returns an image of a mesh region.

Head @ DelaunayMesh[RandomPoint[Disk[], 1000]]

returns

MeshRegion

MeshConnectivityGraph can't seem to take this as an input and return a graph like the ones I see in the examples I'm looking at. It just returns MeshConnectivityGraph wrapped around the image of the mesh region.

Examples of people successfully executing this command:

https://www.wolframcloud.com/obj/s.wolfram/Published/COVID-19-Livestream-March-24.nb

https://community.wolfram.com/groups/-/m/t/1907703

Any insight into why this doesn't work for me, and what I can do to make it work would be very much appreciated. I'm using Mathematica 12.0.

$\endgroup$
1
  • 1
    $\begingroup$ See my comment on the answer. While this method does create graph that is planar, it by far won't sample planar graphs uniformly. You can not draw any conclusion about what planar graphs are in general from graphs generated with this method. $\endgroup$
    – Szabolcs
    Oct 1, 2020 at 17:57

1 Answer 1

2
$\begingroup$

If you look at the documentation for MeshConnectivityGraph on the Wolfram website, you should see this in the upper right corner:

NEW IN 12.1

So that is why it doesn't do what you want in Mathematica 12.0. When I typed that expression into Mathematica on my machine (also running 12.0) it was highlighted in blue, indicating that Mathematica didn't recognize it as a defined symbol. To double check, I used Mathematica's built in help to search for it:

?MeshConnectivityGraph
Missing["UnknownSymbol", "MeshConnectivityGraph"]

This drove me to look online.

$\endgroup$
1
  • 2
    $\begingroup$ You could add that IGraph/M has had IGMeshCellAdjacencyGraph since way before MeshConnectivityGraph existed, and that it works with Mathematica 10.0 and later. $\endgroup$
    – Szabolcs
    Oct 1, 2020 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.