{"id":13731613,"url":"https://github.com/simongeilfus/SimplexNoise","last_synced_at":"2025-05-08T05:30:25.929Z","repository":{"id":54364886,"uuid":"52740035","full_name":"simongeilfus/SimplexNoise","owner":"simongeilfus","description":"Collection of Simplex Noise functions","archived":false,"fork":false,"pushed_at":"2019-10-08T10:40:31.000Z","size":2164,"stargazers_count":133,"open_issues_count":2,"forks_count":18,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-14T22:35:33.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simongeilfus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-28T19:48:14.000Z","updated_at":"2024-10-11T19:30:16.000Z","dependencies_parsed_at":"2022-08-13T13:30:50.273Z","dependency_job_id":null,"html_url":"https://github.com/simongeilfus/SimplexNoise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongeilfus%2FSimplexNoise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongeilfus%2FSimplexNoise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongeilfus%2FSimplexNoise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongeilfus%2FSimplexNoise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simongeilfus","download_url":"https://codeload.github.com/simongeilfus/SimplexNoise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008304,"owners_count":21839625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:33.987Z","updated_at":"2025-05-08T05:30:25.917Z","avatar_url":"https://github.com/simongeilfus.png","language":"C++","readme":"Simplex Noise\n===============\n\n*Alternative to ci::Perlin class.*\n\n**This code is originally intended for use with the Cinder C++ library but only depends on GLM.**\n\nSimplex noise is better looking, faster and has proper derivatives without the grid artifacts of Perlin noise derivatives. This code is mostly ported from Stefan Gustavson public domain implementation for the simplex noise, simplex flow noise and their analytical derivatives. The curl noise functions are adapted from Robert Bridson papers to use derivatives instead of finite differences. There's also a series of noise sums and other multi-fractals noises...\n\n![](NoiseGallery.jpg)\n\n```c++\n//! Returns a 1D simplex noise\nfloat noise( float x );\n//! Returns a 2D simplex noise\nfloat noise( const glm::vec2 \u0026v );\n//! Returns a 3D simplex noise\nfloat noise( const glm::vec3 \u0026v );\n//! Returns a 4D simplex noise\nfloat noise( const glm::vec4 \u0026v );\n\n//! Returns a 1D simplex ridged noise\nfloat ridgedNoise( float x );\n//! Returns a 2D simplex ridged noise\nfloat ridgedNoise( const glm::vec2 \u0026v );\n//! Returns a 3D simplex ridged noise\nfloat ridgedNoise( const glm::vec3 \u0026v );\n//! Returns a 4D simplex ridged noise\nfloat ridgedNoise( const glm::vec4 \u0026v );\n\n//! Returns a 1D simplex noise with analytical derivative.\nglm::vec2 dnoise( float x );\n//! Returns a 2D simplex noise with analytical derivatives.\nglm::vec3 dnoise( const glm::vec2 \u0026v );\n//! Returns a 3D simplex noise with analytical derivatives.\nglm::vec4 dnoise( const glm::vec3 \u0026v );\n// not optimal but easiest way to return 5 floats\ntypedef std::array\u003cfloat,5\u003e vec5;\n//! Returns a 4D simplex noise with analytical derivatives\nvec5\tdnoise( const glm::vec4 \u0026v );\n\t\n//! Returns a 2D simplex cellular/worley noise\nfloat worleyNoise( const glm::vec2 \u0026v );\n//! Returns a 3D simplex cellular/worley noise\nfloat worleyNoise( const glm::vec3 \u0026v );\n//! Returns a 2D simplex smooth cellular/worley noise\nfloat worleyNoise( const glm::vec2 \u0026v, float falloff );\n//! Returns a 3D simplex smooth cellular/worley noise\nfloat worleyNoise( const glm::vec3 \u0026v, float falloff );\n\n//! Returns a 2D simplex noise with rotating gradients\nfloat flowNoise( const glm::vec2 \u0026v, float angle );\n//! Returns a 3D simplex noise with rotating gradients\nfloat flowNoise( const glm::vec3 \u0026v, float angle );\n\n//! Returns a 2D simplex noise with rotating gradients and analytical derivatives\nglm::vec3 dFlowNoise( const glm::vec2 \u0026v, float angle );\n//! Returns a 3D simplex noise with rotating gradients and analytical derivatives\nglm::vec4 dFlowNoise( const glm::vec3 \u0026v, float angle );\n\n//! Returns the curl of a 2D simplex noise\nglm::vec2 curlNoise( const glm::vec2 \u0026v );\n//! Returns the curl of a 2D simplex flow noise\nglm::vec2 curlNoise( const glm::vec2 \u0026v, float t );\n//! Returns the curl of a 2D simplex noise fractal brownian motion sum\nglm::vec2 curlNoise( const glm::vec2 \u0026v, uint8_t octaves, float lacunarity, float gain );\n//! Returns the curl of a 3D simplex noise\nglm::vec3 curlNoise( const glm::vec3 \u0026v );\n//! Returns the curl of a 3D simplex flow noise\nglm::vec3 curlNoise( const glm::vec3 \u0026v, float t );\n//! Returns the curl approximation of a 3D simplex noise fractal brownian motion sum\nglm::vec3 curlNoise( const glm::vec3 \u0026v, uint8_t octaves, float lacunarity, float gain );\n\n//! Returns the curl of a custom 2D potential using finite difference approximation\nglm::vec2 curl( const glm::vec2 \u0026v, const std::function\u003cfloat(const glm::vec2\u0026)\u003e \u0026potential, float delta = 1e-4f );\n//! Returns the curl of a custom 3D potential using finite difference approximation\nglm::vec3 curl( const glm::vec3 \u0026v, const std::function\u003cglm::vec3(const glm::vec3\u0026)\u003e \u0026potential, float delta = 1e-4f );\n\n//! Returns a 1D simplex noise fractal brownian motion sum\nfloat fBm( float x, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 2D simplex noise fractal brownian motion sum\nfloat fBm( const glm::vec2 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 3D simplex noise fractal brownian motion sum\nfloat fBm( const glm::vec3 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 4D simplex noise fractal brownian motion sum\nfloat fBm( const glm::vec4 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n\n//! Returns a 1D simplex noise fractal brownian motion sum with analytical derivatives\nglm::vec2 dfBm( float x, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 2D simplex noise fractal brownian motion sum with analytical derivatives\nglm::vec3 dfBm( const glm::vec2 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 3D simplex noise fractal brownian motion sum with analytical derivatives\nglm::vec4 dfBm( const glm::vec3 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 4D simplex noise fractal brownian motion sum with analytical derivatives\nvec5\tdfBm( const glm::vec4 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n\n//! Returns a 1D simplex ridged multi-fractal noise sum\nfloat ridgedMF( float x, float ridgeOffset = 1.0f, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 2D simplex ridged multi-fractal noise sum\nfloat ridgedMF( const glm::vec2 \u0026v, float ridgeOffset = 1.0f, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 3D simplex ridged multi-fractal noise sum\nfloat ridgedMF( const glm::vec3 \u0026v, float ridgeOffset = 1.0f, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns a 4D simplex ridged multi-fractal noise sum\nfloat ridgedMF( const glm::vec4 \u0026v, float ridgeOffset = 1.0f, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n\n//! Returns the 2D simplex noise fractal brownian motion sum variation by Iñigo Quilez\nfloat iqfBm( const glm::vec2 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n//! Returns the 2D simplex noise fractal brownian motion sum variation by Iñigo Quilez\nfloat iqfBm( const glm::vec3 \u0026v, uint8_t octaves = 4, float lacunarity = 2.0f, float gain = 0.5f );\n\n//! Returns the 2D simplex noise fractal brownian motion sum variation by Iñigo Quilez that use a mat2 to transform each octave\nfloat iqMatfBm( const glm::vec2 \u0026v, uint8_t octaves = 4, const glm::mat2 \u0026mat = glm::mat2( 1.6, -1.2, 1.2, 1.6 ), float gain = 0.5f );\n\n//! Seeds the permutation table with new random values\nvoid seed( uint32_t s );\n```\n","funding_links":[],"categories":["Maths"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongeilfus%2FSimplexNoise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimongeilfus%2FSimplexNoise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongeilfus%2FSimplexNoise/lists"}