ZiroxTKL/QuadTree-AED — reverse-engineered prompt
Reverse engineered prompt
Build me a small C++ project around a quadtree data structure that feels complete and easy to try out.
I want a reusable core library for storing 2D points or rectangles and doing the usual spatial queries like insert, remove, search by area, and nearest or nearby lookup if that makes sense. Please also include a simple app that shows it working with sample data, plus a basic visualization so I can actually see how the space gets divided and what the queries return. A lightweight benchmark section would be great too, just enough to compare quadtree queries against a naive scan on larger random datasets.
Keep it organized so the core logic, demo app, benchmarks, and visualization are separate, and make the whole thing build and run cleanly with CMake. Add a short README with how to build it, what it does, and a couple of example commands. If anything is unclear, look up current quadtree best practices online and make reasonable choices.
Want more depth? Deep Reverse