Is it possible to get a Perfect Score on this Chaos Emerald Bonus Stage?
The trick here is that you don't have to make a rectangle, you just have to enclose blue sphere's to make rings. So, if you go around the edge of the 'flower' pattern they'll all turn into rings.
See this awesome picture below (original source, SonicRetro):
On this level I typically jump over the last blue sphere on the route, then complete this sequence, then go back and get the last one. If you don't leave a blue sphere then when you complete the sequence they'll all turn to rings, but you won't have a chance to get them.