Function to find an inscribed polygon