Skip to content

Instantly share code, notes, and snippets.

View zubco's full-sized avatar
🐾
-_-

Pavel Zubco zubco

🐾
-_-
View GitHub Profile
@zubco
zubco / gist:230e1661f5e240751916691533eafab2
Last active November 20, 2017 07:58
GKNoiseMap bug report
let noise = GKNoise(GKPerlinNoiseSource())
// Invalid - gray texture example
let invalideNoiseMap = GKNoiseMap(
noise,
size: double2(1, 1),
origin: double2(1, 1),
sampleCount: int2(100, 100),
seamless: true
)
@zubco
zubco / Perlin_Tiled.cs
Created November 17, 2017 16:17 — forked from Flafla2/Perlin_Tiled.cs
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
//
// NSObject+setValuesForKeysWithJSONDictionary.h
// SafeSetDemo
//
// Created by Tom Harrington on 12/29/11.
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>