Drawing algorithm | ScratchStats