completed code

todo: incorporate check if incomplete tile, and figure out how many
spacings to get and what cutoff to use if looking for periodic
approximant