algorithm is similar to, and inspired by complexification.net; an improved version can be seen here