BOOST Voronoi Visualizer
[Email protected]
Abstract. The Voronoi extension of the Boost.polygon library provides functionality to construct a Voronoi diagram of a set of s and linear segments in 2D space with some limitations. The paper mainly describles how to compile the boos Voronoi visualizer and use it show the example Voronoi diagram result.
Key Words. Boost, Voronoi, Visualizer
1.Introduction
The Boost.polygon Voronoi Library, sponsored by Intel, provides the ability to construct Voronoi graphs based on points and segments in a two-dimensional space.
Figure 1.1 Voronoi Diagram generated by Boost.polygon Voronoi Library
The Boost Voronoi library has the following features:
V Open source Open source (Boost software License);
V provides support for line segments fully functional with segments;
V Stable and efficient robustness and efficiency;
V outputs accurate precision of the output structures;
The V-interface is simple and easy to use Interface;
V do not rely on third party Library no third parties Dependencies;
Because the template is implemented, the source code is provided in the form of a header file, not relying on any third-party library, convenient program deployment. The program interface is simple, it is easy to use in the program, and the output result is accurate, the algorithm performance is high. Provides support for line segments, even if some business libraries do not provide support for line segments.
In the visulalization boost Voronoi in openscenegraph article has introduced the use of the Boost Voronoi library, this article mainly describes how to compile the boost comes with the display Voronoi diagram program, To visualize the data.
2.Compile
Because Boost.polygon's Voronoi library does not rely on any third-party libraries, and the visualizer Voronoi_visualizer uses QT, the compilation of the program is simple. Once you've configured the boost library and the QT Library, you're ready. The following is a detailed introduction to the compilation process for using Qt-plugin in Visual Studio.
2.1 Create a new QT application
After installing Visual Studio Qt-plugin, a QT-related project appears in the new interface, where a QT application project is created, as shown in:
Figure 2.1 New Project
2.2 Configuration Engineering
Because Voronoi_visualizer uses the OpenGL library for Qt, the OpenGL library needs to be selected, as shown in:
Figure 2.2 Select OpenGL Library
2.3 Deleting files
The program automatically generates MAIN.CPP and Voronoivisualizer.h, voronoivisualizer.cpp Delete, and will boost the files of the library voronoi_visual_utils.hpp and Voronoi_ Visualizer.cpp copied to the project folder, and added to the project, compile.
Figure 2.3 Voronoi Visualizer
3.Show OFF
Once the compilation is successful, you can visualize the sample data for boost. Select the data entry directory via the button browse input directory and double-click on the data in the file list to display the results.
PDF version:boost Voronoi Visualizer
BOOST Voronoi Visualizer