{"id":20581811,"url":"https://github.com/wardbenjamin/simplexnoise","last_synced_at":"2025-04-05T05:04:20.289Z","repository":{"id":29736670,"uuid":"33280070","full_name":"WardBenjamin/SimplexNoise","owner":"WardBenjamin","description":"C# Simplex Noise (1D, 2D, 3D). Supports arbitrary sizes and scales.","archived":false,"fork":false,"pushed_at":"2023-11-18T02:30:49.000Z","size":78,"stargazers_count":169,"open_issues_count":5,"forks_count":40,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T04:04:43.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SteveSanderson/Blazor","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WardBenjamin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-02T00:21:32.000Z","updated_at":"2025-03-27T20:08:10.000Z","dependencies_parsed_at":"2024-06-21T05:45:27.043Z","dependency_job_id":"b3c8cc35-2240-4db6-8a70-e7adc525f591","html_url":"https://github.com/WardBenjamin/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/WardBenjamin%2FSimplexNoise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FSimplexNoise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FSimplexNoise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WardBenjamin%2FSimplexNoise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WardBenjamin","download_url":"https://codeload.github.com/WardBenjamin/SimplexNoise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289424,"owners_count":20914464,"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-11-16T06:31:20.467Z","updated_at":"2025-04-05T05:04:20.273Z","avatar_url":"https://github.com/WardBenjamin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simplex Noise\n\nSimplex Noise implementation offering 1D, 2D, and 3D forms w/ values in the range of 0 to 255. Based on work by Heikki Törmälä (2012) and Stefan Gustavson (2006). Core algorithm designed by Ken Perlin (2001). \n\n[![Nuget](https://img.shields.io/nuget/v/SimplexNoise.svg?logo=nuget)](https://www.nuget.org/packages/SimplexNoise/2.0.0)\n[![Nuget](https://img.shields.io/nuget/dt/SimplexNoise.svg)](https://www.nuget.org/packages/SimplexNoise/2.0.0)\n\n### What does this library provide?\n\nThis library provides 1D, 2D, and 3D simplex noise, which is useful for procedural content generation - for example, terrain and particles in game development or visual media in movies. Compared to classic Perlin noise, simplex noise has no noticable directional artefacts, and has a well-defined and continuous (coherent) gradient. This means content will be visually smoother, with a lower computational complexity especially at higher orders.\n\nComputations use the following r^2 values to determine kernel contribution:\n\n| Order | Value |\n|-------|-------|\n| 1D    | 1.0   |\n| 2D    | 0.5   |\n| 3D    | 0.6   |\n\n\n### Why use simplex noise?\n\nClassic noise has problems with non-uniformity throughout its domain of definition, particularly for 2D planar slices of 3D and 4D noise, it has visible axis-aligned artefacts, it is expensive to compute for 4D and up, and its derivative in 3D and 4D is a very complicated high order polynomial.\n\nSimplex noise is several times faster to compute, particularly for 4D and up, it does not have nearly as many visual problems with non-uniformity and axis-aligned artefacts, and it has a simple polynomial derivative everywhere, even for higher dimensions.\n\nSimplex noise looks better, but different, and is thus visually incompatible with classic Perlin noise. The difference in feature size and range of values can easily be compensated for by a few simple scaling multiplications, but the different visual character might change the visual result of shaders that depend heavily on one or two components of noise. (Fractal sums of several noise components should still look about the same, though.)\n\n### Example of implementation\n\n```csharp\nusing SimplexNoise;\n\nNoise.Seed = 209323094; // Optional\n\nint length = 10, width = 15; // The number of points to generate in the 1st and 2nd dimension\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat[,] noiseValues = Noise.Calc2D(length, width, scale); // Returns an array containing 2D Simplex noise\n```\n\n### API\n\n- [Noise.Seed](#noiseseed) - Arbitrary integer seed used to generate lookup table used internally.\n- [float\\[\\] Noise.Calc1D](#noisecalc1d) - returns an array containing 1D Simplex noise\n- [float\\[,\\] Noise.Calc2D](#noisecalc2d) - returns an array containing 2D Simplex noise\n- [float\\[,,\\] Noise.Calc3D](#noisecalc3d) - returns an array containing 3D Simplex noise\n- [float Noise.CalcPixel1D](#noisecalcpixel1d) - returns the value of an index of 1D simplex noise\n- [float Noise.CalcPixel2D](#noisecalcpixel2d) - returns the value of an index of 2D simplex noise\n- [float Noise.CalcPixel3D](#noisecalcpixel3d) - returns the value of an index of 3D simplex noise\n\n#### Noise.Seed\n\nArbitrary integer seed used to generate lookup table used internally. You can set the `Seed` property to get deterministic noise, otherwise, the `Seed` will default to `0`.\n\n```csharp\nNoise.Seed = 123456;\n```\n\n#### Noise.Calc1D\n\nCreates 1D Simplex noise.\n\n```csharp\nint width = 10; // The number of points to generate\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets // The scale of the noise. The greater the scale, the denser the noise gets\nfloat[] noise = Noise.Calc1D(width, scale); // Returns an array containing 1D Simplex noise\n```\n\n#### Noise.Calc2D\n\nCreates 2D Simplex noise.\n\n```csharp\nint width = 10, height = 15; // The number of points to generate in the 1st and 2nd dimension\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat[,] noise = Noise.Calc2D(width, height, scale); // Returns an array containing 2D Simplex noise\n```\n\n#### Noise.Calc3D\n\nCreates 3D Simplex noise.\n\n```csharp\nint width = 10, height = 15, length = 20; // The number of points to generate in the 1st, 2nd and 3rd dimension\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat[,,] noise = Noise.Calc3D(width, height, length, scale); // Returns an array containing 3D Simplex noise\n```\n\n#### Noise.CalcPixel1D\n\nGets the value of an index of 1D simplex noise.\n\n```csharp\nint x = 10; // Index\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat pixel = Noise.CalcPixel1D(x, scale); // Returns the value of an index of 1D simplex noise\n```\n\n#### Noise.CalcPixel2D\n\nGets the value of an index of 2D simplex noise.\n\n```csharp\nint x = 10, y = 15; // Indexes for the 1st and 2nd dimension\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat pixel = Noise.CalcPixel2D(x, y, scale); // Returns the value of an index of 2D simplex noise\n```\n\n#### Noise.CalcPixel3D\n\nGets the value of an index of 3D simplex noise.\n\n```csharp\nint x = 10, y = 15, z = 20; // Indexes for the 1st, 2nd and 3rd dimension\nfloat scale = 0.10f; // The scale of the noise. The greater the scale, the denser the noise gets\nfloat pixel = Noise.CalcPixel3D(x, y, z, scale);// Returns the value of an index of 3D simplex noise\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwardbenjamin%2Fsimplexnoise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwardbenjamin%2Fsimplexnoise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwardbenjamin%2Fsimplexnoise/lists"}