Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python (Updated for Python 3.7) | |
| Usage: | |
| ./dummy-web-server.py -h | |
| ./dummy-web-server.py -l localhost -p 8000 | |
| Send a GET request: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // by alex evans, 2011. released into the public domain. | |
| // based on a first ever reading of the png spec, it occurs to me that a minimal png encoder should be quite simple. | |
| // this is a first stab - may be buggy! the only external dependency is zlib and some basic typedefs (u32, u8) | |
| // | |
| // VERSION 0.02! now using zlib's crc rather than my own, and avoiding a memcpy and memory scribbler in the old one | |
| // by passing the zero byte at the start of the scanline to zlib first, then the original scanline in place. WIN! | |
| // | |
| // more context at http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. | |
| // | |
| // follow me on twitter @mmalex http://twitter.com/mmalex |