Jeff-Hugh/GenPorMed ? reverse-engineered prompt
Reverse engineered prompt
Build me a small C++ tool that generates random porous media using the QSGS method, with both 2D and 3D options.
I want to be able to set the main porosity and then generate a porous structure, save it as an image if possible, and also export data that can be used to make an STL file later. If it helps, include simple example settings in the main program so I can run it right away and see a sample 2D and 3D result.
Please keep it easy to compile with CMake, and make sure the code can run from the command line. If you need to use GnuPlot or Boost for the image output, that’s fine, but keep the core generator working even if those parts are skipped. If there is a Python step for STL export, wire that up in a simple way too and make the output files straightforward to find.
Are you gonna build this?
make sure you review the code using coderabbit