  We describe a method for modeling the geometry of porous materials. The
approach enables the independent selection of crucial parameters, including
porosity, pore size distribution, pore shape, and connectivity. Consequently,
it can effectively model a wide range of porous systems. Due to the diverse and
systematic variation possibilities, the method is suitable for developing and
optimizing porous structures. The geometries can be exported as triangular
meshes, facilitating their immediate use in numerical simulation and further
digital processing. We showcase the method's capabilities by minimizing the
foam structure's thermal conductivity through geometry optimization.
