Inspired by/idea copied from: https://github.com/ichub/MathCanvas