-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correlated randomness #115
Comments
That'd be awesome! Would it be possible to make the |
Sure, sounds good. I wasn't aware of the noiseDetail() part of the interface, I'll have to extend my implementation to handle that. Will require some thought to make the interface as lispy as possible. |
I've extracted my implementation to a package: https://github.com/Kevinpgalligan/noisy Pending its addition to quicklisp: quicklisp/quicklisp-projects#2384 Then all that remains is adding a simple noise interface to sketch and writing the docs. |
'noisy' is now in quicklisp, so I'll work on adding a noise API to Sketch. Should just be a light shim over noisy. |
Aaaand it's pretty much done: Kevinpgalligan@697b6f1 Just need to add docs, and then there will be a PR. |
Perlin noise, and other forms of correlated randomness, are commonly used in generative art. See this video by The Coding Train: https://www.youtube.com/watch?v=BjoM9oKOAKY
p5.js provides a simple interface,
noise(x[, y[, z]])
, to get correlated noise values. See: https://www.geeksforgeeks.org/p5-js-noise-function/I've implemented my own version of Perlin noise, which I would be happy to contribute to the sketch repository.
Usefully, my version can be initialised from a seed, which allows sketches to be reproduced by keeping the seed constant. It also works for any number of input dimensions. Other CL noise implementations that I've found have not had these properties.
However, I will have to clean up the code/interface and write documentation to accompany it. Any suggestions for the interface are welcome.
(Apologies for spamming the repo with issues; I just want to keep track of the things that I'm planning to work on over the coming months).
(Also, it might be an idea to develop this as a separate quicklisp package, add it as a sketch dependency, and re-export the symbols. That way, it could be reused by others independently of sketch).
The text was updated successfully, but these errors were encountered: