예제 #1
0
double C3DPerlinNoise::generateNoise1D(double x)
{
	x *= _frequency;
	int ix = (int)x;
	double s = x - ix;
	ix += _seed;
	double r1 = noise1d(ix);
	double r2 = noise1d(ix + 1);
	return interpolate(r1, r2, s) * _factorScale + _factorAdd;
}
예제 #2
0
파일: Perlin.hpp 프로젝트: 0----0/cppvox
float noise3d(uint x, uint y, uint z) {
        return noise1d(x + y * 67 + z * 101);
}
예제 #3
0
파일: Perlin.hpp 프로젝트: 0----0/cppvox
float noise2d(uint x, uint y) {
        return noise1d(x + y * 71);
}
예제 #4
0
static inline double noise2d(int x, int y)
{
	int n = x + y * 57;
	return noise1d(n);
}