UP | HOME

MRPTree Quick Start

Copyright © 2024 Mitch Richling. All rights reserved.

Table of Contents

1. MRPtree Quick Start

While MRPtree comes with some examples, they are very basic – perfect for the quadtree/octree expert just wanting to know how to get up and running. For more sophisticated examples illustrating how to make use of quadtree/octree-type data structures, see the examples in the MRCellCplx3D library.

2. Building MRPtree Examples With CMake

A typical shell session to build the examples might look like this:

git clone 'https://github.com/richmit/MRPTree.git' # First clone the repo
cd MRPTree                                         # Change directory into the repo
rm -rf build                                       # Remove any existing build directy
mkdir build                                        # Create a new build directy
cd build                                           # Chaned directory into the build directory
cmake -G 'MSYS Makefiles' ..                       # Configure build (in this example for Windows running MSYS2)
cmake --build . -t examples                        # Build the examples
./hello_world.exe                                  # Run the example (leave off the ".exe" on Linux/MacOS

3. Building MRPtree Examples Without CMake

If you really don't want to use cmake, then this will get you started:

git clone 'https://github.com/richmit/MRPTree.git'                                  # First clone the repo
cd MRPTree                                                                          # Change directory into the repo
rm -rf build                                                                        # Remove any existing build directy
mkdir build                                                                         # Create a new build directy
cd build                                                                            # Chaned directory into the build directory
cmake -G 'MSYS Makefiles' ..                                                        # Configure build (in this example for Windows running MSYS2)
g++ -m64 -std=gnu++23 -I ../lib hello_world_regular.cpp -o hello_world_regular.exe  # Build an example
./hello_world_regular.exe                                                           # Run the example
gnuplot ../examples/hello_world_regular.gp                                          # Plot the output with GNUplot