jwagner / simplex-noise.js

A fast simplex noise implementation in Javascript / Typescript.
MIT License
1.61k stars 130 forks source link

higher dimensions #34

Open dribnet opened 3 years ago

dribnet commented 3 years ago

Would you consider supporting dimensions beyond 4D, specifically 5D and 6D?

For me this would simplify use-cases for looping / tiling animations such as #29 which can be implemented by using two of the dimensions to sample along a circle.

jwagner commented 3 years ago

Hi Tom,

I think adding additional code paths for 5D and 6D explicitly would probably be too specific. Adding a slower N dimensional variant would make more sense I think.

I besides my job currently need quite a bit of distraction away from the computer which means my time to hack is fairly limited. I probably won't implement this any time soon but I'd be happy to discuss a contribution of anyone feels like tackling this.

Depending on your needs sampling a displacement vector from a set of 2D noise fields might be an option. You could then modulate the input into the 4D noise field using that. Definitely not the same effect but you might be able to get away with it. :)

Cheers, Jonas