Hi, this is almost exactly what I am trying to do! and it looks to be a clever and simple algorithm. Sadly, the link to the implementation is broken. Would you mind sharing your code? Thanks!