Last active
August 25, 2023 19:13
-
-
Save adefossez/0646dbe9ed4005480a2407c62aac8869 to your computer and use it in GitHub Desktop.
Perlin noise.ipynb
@NathalieBrun, sorry about that, it's fixed now!
Hi, Thank you for the nice implementation.
Just a tiny issue is that based on http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf - page 2, 6t^5 - 15t^4 + 10t^3
interpolation is preferred.
Hi there!
Is there a chance that this code only runs on 1:1 ratios?
Would there be a solution or could you guide me on making it useful for other ratios?
Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
I tried the code but got the following error message :
Thanks a lot
TypeError Traceback (most recent call last)
in
2 for idx, rho in enumerate([1, 2, 4, 8]):
3 plt.subplot(2, 2, idx + 1)
----> 4 out = perlin_ms([rho**-i for i in range(4)], 6, 6).cpu().numpy()
5 plt.imshow(out)
6 plt.title(f"Decay for finer grids as {rho} ** -scale")
in perlin_ms(octaves, width, height, device)
27 for oct in octaves:
28 p = perlin(width, height, scale, device)
---> 29 out += p * oct
30 scale //= 2
31 width *= 2
TypeError: unsupported operand type(s) for +=: 'int' and 'tuple'