Skip to content

Cookbook for Perlin noise#921

Open
TilmanMay wants to merge 4 commits into
GeodynamicWorldBuilder:mainfrom
TilmanMay:documentation
Open

Cookbook for Perlin noise#921
TilmanMay wants to merge 4 commits into
GeodynamicWorldBuilder:mainfrom
TilmanMay:documentation

Conversation

@TilmanMay
Copy link
Copy Markdown
Contributor

Added a cookbook explaining the perlin noise feature, as Menno said, this would be good for documentation purposes.
#916 followup

@github-actions
Copy link
Copy Markdown

Benchmark Main Feature Difference (99.9% CI)
Slab interpolation simple none 1.285 ± 0.006 (s=357) 1.286 ± 0.008 (s=346) -0.1% .. +0.2%
Slab interpolation curved simple none 1.287 ± 0.006 (s=335) 1.286 ± 0.007 (s=367) -0.2% .. +0.1%
Spherical slab interpolation simple none 1.194 ± 0.011 (s=411) 1.193 ± 0.011 (s=346) -0.3% .. +0.1%
Slab interpolation simple curved CMS 1.321 ± 0.006 (s=339) 1.321 ± 0.008 (s=345) -0.1% .. +0.1%
Spherical slab interpolation simple CMS 1.604 ± 0.015 (s=297) 1.605 ± 0.009 (s=266) -0.1% .. +0.3%
Spherical fault interpolation simple none 1.267 ± 0.009 (s=345) 1.265 ± 0.006 (s=368) -0.3% .. +0.0%
Cartesian min max surface 3.057 ± 0.013 (s=143) 3.064 ± 0.013 (s=154) +0.0% .. +0.4%
Spherical min max surface 8.571 ± 0.092 (s=57) 8.576 ± 0.090 (s=50) -0.6% .. +0.8%

Copy link
Copy Markdown
Contributor

@danieldouglas92 danieldouglas92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @TilmanMay, thanks for adding this, it looks great! The figures are very pretty and the documentation in your README is clear. Aside from a few typos, my only comment is that your figure captions aren't being formatted correctly in the built doc. See my comments on the README for how to fix this.

This cookbook demonstrates how to set up a 3D Cartesian model in World Builder using Perlin noise to generate spatially varying temperature and composition fields.


Normal temperature field without added disturbances
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this is supposed to be a figure caption, but in the built docs it does not render that way. To have this be a figure caption, you have to include it between the ::: :::, so it would look like this:

:::{figure} normal_field.png
:name: perlin_noise_normal_field
:alt: Normal temperature field (without noise)
:align: center

Normal temperature field without added disturbances
:::


## Model description

This example contains a simple mantle features with its temperature field disturbed. Perlin noise is used to introduce realistic, multi-scale variations in both temperature and composition fields.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This example contains a simple mantle features with its temperature field disturbed. Perlin noise is used to introduce realistic, multi-scale variations in both temperature and composition fields.
This example contains a simple mantle feature with a disturbed temperature field. Perlin noise is used to introduce realistic, multi-scale variations in both temperature and composition fields.

- `min temperature` / `max temperature`: Set the output value range for the noise field.
- `octaves`: Number of noise layers combined; more octaves add detail and complexity.
- `lacunarity`: Frequency multiplier for each octave (e.g., `frequency *= lacunarity`, default: 2.0). So the next layer has double the frequency, thus lower wavelength and more detail.
- `persistence`: Amplitude multiplier for each octave (e.g., `amplitude *= persistence`, default: 0.5). So the next layers impact of the overall field is have as small.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `persistence`: Amplitude multiplier for each octave (e.g., `amplitude *= persistence`, default: 0.5). So the next layers impact of the overall field is have as small.
- `persistence`: Amplitude multiplier for each octave (e.g., `amplitude *= persistence`, default: 0.5). So the next layers impact of the overall field is halved.

@danieldouglas92
Copy link
Copy Markdown
Contributor

Please add a changelog entry for this as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants