As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
| float hash (float2 n) | |
| { | |
| return frac(sin(dot(n, float2(123.456789, 987.654321))) * 54321.9876 ); | |
| } | |
| float noise(float2 p) | |
| { | |
| float2 i = floor(p); | |
| float2 u = smoothstep(0.0, 1.0, frac(p)); | |
| float a = hash(i + float2(0,0)); |