Skip to content

Instantly share code, notes, and snippets.

@beesandbombs
beesandbombs / rectSpiral.pde
Created January 12, 2019 13:55
rect spiral
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@beesandbombs
beesandbombs / wavyHexagon.pde
Created November 18, 2018 19:11
wavy hexagon
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@danielvarga
danielvarga / hyperbolic_tsne.py
Last active April 30, 2021 16:35
Changed the metric of the t-SNE embedded space from L2 to the hyperbolic distance on a Poincaré disk
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de>
# Author: Christopher Moody <chrisemoody@gmail.com>
# Author: Nick Travers <nickt@squareup.com>
# License: BSD 3 clause (C) 2014
# This is the exact and Barnes-Hut t-SNE implementation. There are other
# modifications of the algorithm:
# * Fast Optimization for t-SNE:
# http://cseweb.ucsd.edu/~lvdmaaten/workshops/nips2010/papers/vandermaaten.pdf