I couldn’t find a good explanation of this algorithm, but with your program, I was able to make sense of Wikipedia’s. Thanks.