an escape time algorithm in python