A demo of random geometric graphs
In graph theory, a random geometric graph (RGG) is the mathematically simplest spatial network, namely an undirected graph constructed by randomly placing N nodes in some metric space (according to a specified probability distribution) and connecting two nodes by a link if and only if their distance is in a given range, e.g. smaller than a certain neighborhood radius, r.
See more from https://en.wikipedia.org/wiki/Random_geometric_graph.
- Windows 10
- MSYS2 64 bit 20200720
- Qt Creator 4.12.4
- openFrameworks Nightly Build (of_v20200818_msys2_mingw64)
Note: The original codes were developed back in 2013 on a Mac with a different version of openFrameworks. I figure it would be interesting to revisit the repo and migrate it to Windows. However, as of August 18, 2020, I couldn't make it work with the recent release (0.11.0) of openFrameworks. See Compilation failing due to confliting definition in openal. I ended up with a nightly build that comes with a fix. Check the following Setup section for details.
Features:
- change neighbor radius (
r) dynamically - change number of random nodes (
n) dynamically - display edges between neighbors
- display nodes with max/min neighbors
Features:
- change neighbor radius (
r) dynamically - change number of random nodes (
n) dynamically - display edges between neighbors
- display nodes with max/min neighbors
- display sphere's 3d layout
- drag and change the orientation of nodes
- auto rotate with different speeds
-
Use Uncrustify to beautify the source codes. Download the latest release and place the executable in the PATH. Then follow instructions to configure Qt Creator.
-
Setup a new kit for msys2. According to this post, remember to configure
MINGW_PREFIXandMSYSTEM. (I place msys2 in my user PATH instead of system PATH. Hence, I need to configure the PATH again.) See screenshot below. -
Download the openFrameworks release and unzip it in a certain location. A new openFrameworks project shall be created in location's
apps/myApps, since the default Makefile would rely on some other files in the related paths. -
Finally make sure to choose the custom kit for the Qt project.
-
If addons are selected in the project creation wizard, remember to create a
addons.makefile and list the chosen addons inside.




