Skip to content

Instantly share code, notes, and snippets.

View heyarne's full-sized avatar

heyarne

View GitHub Profile
@heyarne
heyarne / Perlin.cs
Created May 20, 2019 09:39 — forked from Flafla2/Perlin.cs
Improved Perlin Noise Implementation in C#
public class Perlin {
public static double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
double frequency = 1;
double amplitude = 1;
for(int i=0;i<octaves;i++) {
total += perlin(x * frequency, y * frequency, z * frequency) * amplitude;
amplitude *= persistence;