The Multiscale Rasterization project implements a 2D version of the algorithm described in the paper "Efficient and Robust Octree Generation for Implementing Topological Queries for Building Information Models" by Daum et al. (2012). This project aims to efficiently rasterize polylines at multiple scales, providing a robust solution for geometric modeling and visualization.
- Efficient Octree Structure: Utilizes a contiguous node pool for efficient memory management and fast access.
- Cross-Linked Flood Fill: Implements a cross-linked flood fill algorithm to classify interior and exterior cells accurately.
- Flexible Geometry Representation: Supports various geometric shapes, including rectangles, polygons, and circles.
- Python Wrapper: Provides a user-friendly Python interface for easy integration and visualization.
To set up the project, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/multiscale-rasterization.git cd multiscale-rasterization -
Install dependencies using
mamba:mamba env create -f environment.yml mamba activate multiscale_rasterization
-
Build the C++ core:
mkdir build cd build cmake .. cmake --build .
-
Run tests to ensure everything is working:
ctest
To use the Multiscale Rasterization library in your Python projects, you can import the necessary classes and functions:
from multiscale_rasterization import Curve, RasterizedObject
# Example of creating a rectangle
rectangle = Curve.rectangle(0.0, 0.0, 10.0, 10.0)For detailed documentation on the API and usage, please refer to the API Guide.
For a deeper insight into the development process of this project, check out my blog post: Developing Multiscale Rasterization.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Daum et al. (2012) for their foundational work on octree generation.
- The open-source community for their invaluable contributions and support.