Perlin Noise Generator

by Tuğrul Yazar | August 20, 2023 21:03

Perlin noise is a gradient noise function that has been widely used in computer graphics, procedural generation, and various other applications to generate natural-looking patterns. Here is my brief exploration of the Perlin Noise Generator. Although I didn’t fully follow the traditional steps[1] the result looks similar. I started with the square grid and generated random gradient vectors on every grid corner. Then, I implemented the original algorithm’s dot product method. To calculate the value of a point in this 2D space, I choose the four closest vectors. Plus, I created four more vectors that have tails on the corners and tips on the point in question. Then, I calculated the dot products between these four corners and four gradient vectors. After this, I quit using the traditional algorithm (the interpolation and ease function). Instead, I finished the algorithm by just calculating the linear interpolations of those dot products.

perlin noise generator

This Grasshopper definition generates random terrain[2] models by using my noise generator explained above. I used the Move and Mesh components to generate the result. You can play with the overall height multiplier to make it more mountainous or flat. The output is a single mesh surface in Rhinoceros. The code is using native Grasshopper components. Thus, no add-ons are necessary for it to work.

perlin noise generator[3]

You can rebuild the definition by looking at the diagram above. However, if you want to support this website by downloading my Grasshopper file; would you consider being my Patreon? Here is the link to my Patreon page[4] including the working Grasshopper files for the Perlin Noise Generator and more. 

perlin noise generator
Endnotes:
  1. the traditional steps: https://rtouti.github.io/graphics/perlin-noise-algorithm
  2. terrain: https://www.designcoding.net/?s=terrain
  3. [Image]: https://www.designcoding.net/decoder/wp-content/uploads/2024/02/Perlin-Noise-Generator-def.jpg
  4. Here is the link to my Patreon page: https://www.patreon.com/posts/perlin-noise-99068844?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link

Source URL: https://www.designcoding.net/perlin-noise/