Way to tell perfect circle from an ellipse?
Hi,
I need to tell in my script whether a pathItem is a perfect circle. I have already a simple algorithm but I'm still missing the final test which requires a "bit" of geometry knowledge. My algorithm so far tests if all of the conditions are fulfilled:
- pathPoints.length==4
- all points are smooth
- width == height (calculated using geometricBounds)
The missing test should examine the bezier curve handles, they should be placed at a precise location for each point. Is anyone in the knowledge how to test them? (Well, I would love the test to handle rotated circles as well, but I could live without that.)
I'm on CS3.
Thanks,
Artur
PS> OK, I have read somewhere that bezier curves are unable to reproduce a circle in a perfect way, but let's save that conversation for another day 😉
