mathandy / svgpathtools

A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
MIT License
557 stars 142 forks source link

Convert a path which consists of multiple CubicBezier curves into a svg circle element #119

Closed codingforpleasure closed 4 years ago

codingforpleasure commented 4 years ago

Given the following Path:

Path(CubicBezier(start=(106.516+133.066j), control1=(106.516+128.285j), control2=(102.641+124.41j), end=(97.8594+124.41j)),
     CubicBezier(start=(97.8594+124.41j), control1=(93.0781+124.41j), control2=(89.2031+128.285j), end=(89.2031+133.066j)),
     CubicBezier(start=(89.2031+133.066j), control1=(89.2031+137.848j), control2=(93.0781+141.723j), end=(97.8594+141.723j)),
     CubicBezier(start=(97.8594+141.723j), control1=(102.641+141.723j), control2=(106.516+137.848j), end=(106.516+133.066j)))

I have read, the standard approach is to divide the circle into four equal sections, and fit each section to a cubic Bézier curve.

I was wondering is there a way to convert a path into simple svg circle element (Like this)?

codingforpleasure commented 4 years ago

My mistake found out, how to resolve this question.