Added perlin noise feature for topography#922
Conversation
Pull Request Test Coverage Report for Build 23892686894Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
|
@TilmanMay Very cool figure!! I can imagine that this will be super useful for landscape evolution modeling to have more control over the initial evolution of a model while still providing randomness. I'll review the code in a few minutes |
danieldouglas92
left a comment
There was a problem hiding this comment.
Thanks for another cool extension of the Perlin Noise functionality! Once again only small comments about documentation and consistency between different features, but once these are addressed I think this is good to go.
In a follow up PR (after your cookbook gets merged), I think it would be great to add another section that documents how you would use this feature in that same cookbook as well.
| * Perlin noise based topography model for oceanic plates. | ||
| * | ||
| * This model generates topography using layered Perlin noise (octaves). | ||
| * Parameters exposed to input files are similar to the continental | ||
| * implementation: min/max depth, min/max topography, frequency, | ||
| * octaves, persistence, lacunarity and operation. | ||
| */ | ||
| class PerlinNoise final: public Interface |
There was a problem hiding this comment.
This doc string is much better than the one you have for the continental .h file. I would copy this one and put it there too
| class PerlinNoise final: public Interface | ||
| { | ||
| public: | ||
| PerlinNoise(WorldBuilder::World *world); | ||
| ~PerlinNoise() override final; | ||
|
|
||
| static void declare_entries(Parameters &prm, const std::string &parent_name = ""); | ||
| void parse_entries(Parameters &prm, const std::vector<Point<2>> &coordinates) override final; | ||
|
|
||
| double get_topography(const Point<3> &position, | ||
| const Objects::NaturalCoordinate &position_in_natural_coordinates, | ||
| double topography) const override final; | ||
|
|
There was a problem hiding this comment.
Missing doc strings for these functions
| /** | ||
| * Constructor | ||
| * @param world pointer to the containing World instance | ||
| */ | ||
| PerlinNoise(WorldBuilder::World *world); | ||
|
|
||
| /** | ||
| * Destructor | ||
| */ | ||
| ~PerlinNoise() override final; | ||
|
|
||
| /** | ||
| * Declare parameter entries used by this model to the Parameters system. | ||
| */ | ||
| static void declare_entries(Parameters &prm, const std::string &parent_name = ""); |
There was a problem hiding this comment.
And you have all the function documentation here that should be copied to continental_plate as well 😄
| void | ||
| PerlinNoise::declare_entries(Parameters &prm, const std::string &) | ||
| { | ||
| // Document plugin. Unlike some topography plugins (e.g. DepthSurface) |
There was a problem hiding this comment.
| // Document plugin. Unlike some topography plugins (e.g. DepthSurface) | |
| // Unlike some topography plugins (e.g. DepthSurface) |
| void | ||
| PerlinNoise::declare_entries(Parameters &prm, const std::string &) | ||
| { | ||
| // Document plugin. This model exposes min/max topography and Perlin |
There was a problem hiding this comment.
| // Document plugin. This model exposes min/max topography and Perlin | |
| // This model exposes min/max topography and Perlin |
|
Also please add a changelog entry! |

Add the option to include perlin noise for the topography