openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.97k stars 2.55k forks source link

multidimensional noise output #1134

Open kylemcdonald opened 12 years ago

kylemcdonald commented 12 years ago

theo's #1133 made me think about ways that i use noise regularly that might also be abstracted.

i would also like to see versions of noise that return multidimensional results. normally i do something like:

ofVec2 a(ofSignedNoise(t, 0), ofSignedNoise(0, t)); // 1D -> 2D
ofVec2 b(ofSignedNoise(x, 0), ofSignedNoise(0, y)); // 2D -> 2D
ofVec3 c(ofSignedNoise(t, 0, 0), ofSignedNoise(0, t, 0), ofSignedNoise(0, 0, t)); // 1D -> 3D
ofVec3 d(ofSignedNoise(x, 0, 0), ofSignedNoise(0, y, 0), ofSignedNoise(0, 0, (x + y) / 2)); // 2D -> 3D

and it would be good to spend some time making sure these are really good ways of doing it, then implement them inside some functions like ofSignedNoise2() and ofSignedNoise3() (for example).

ofTheo commented 12 years ago

so ofSignedNoiseVec2(float x, float y); so ofSignedNoiseVec3(float x, float y, float z);

multi octave noise could be good to look at too.

elliotwoods commented 12 years ago

also note #1005