Skip to content

Instantly share code, notes, and snippets.

Avatar
🐉
418 I'm a teapot!

Adam Rolczyk omzeton

🐉
418 I'm a teapot!
View GitHub Profile
View glsl-rotation-2d
vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, -s, s, c);
return m * v;
}
@tpae
tpae / Trie.js
Created Nov 20, 2016
Trie.js - super simple JavaScript implementation
View Trie.js
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
function TrieNode(key) {
// the "key" value will be the character in sequence
this.key = key;
View sierpinskitriangleloop.pde
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;