I'm writing a program that generates penrose tilings and I wanted to use Java's Graphics2D class. I was wondering if there was any way to check if 2 or more shapes share a border with each other. Should I just compare the slopes and base points or is there an alternate method?