I read post about convert bitmap to equation,but bitmap is not so accurate as vector graph, then I want to find a method for convert vector graph to equation.

This is the examle pdf file.I already import this file into mathematica as below:

enter image description here

If I know the equation of this plot, I can Contourplot[equation] this object.
How to find the equation of this object?

  • $\begingroup$ What's the point of having an equation here? Apply InputForm to the imported graphic and you will find, e.g., FilledCurve primitives for the letter "a". You can extract them from the Graphics object (let's call it g) with Cases[g,_ JoinedCurve,All]. FilledCurve is quite similar to JoinedCurve and I know that you already got in contact with JoinedCurve... So you can manipulate also FilledCurves... $\endgroup$ Mar 8 '18 at 10:01
  • $\begingroup$ See also this post for the internal details of FilledCurve. $\endgroup$ Mar 8 '18 at 10:05
  • $\begingroup$ @HenrikSchumacher,everything is data.You give equation x^2+y^2==1then I could plot a same circle.Then I want to find what data make this plot. $\endgroup$
    – kittygirl
    Mar 8 '18 at 10:27
  • 2
    $\begingroup$ But not everything is smooth/analytic data. Moreover, an implicit equation would contain much more (superfluous) information than the graphics primitives, so there is a humongous arbitrariness involved. It is also a very bad idea (performancewise) to solve a 1-dimensional problem by 2-dimensional means. And a ContourPlot would usually be only a very poor approximation to the geometric objects, in particular, if the objects are already described exactly, e.g. by lines, Bezier curves and splines. $\endgroup$ Mar 8 '18 at 10:34
  • $\begingroup$ Echoing Henrik's comments: I would say that for objects like these, an explicit equation is impractical compared to a spline representation such as the one already produced by importing the PDF. If the only reason you want an equation for this is for plotting purposes, then converting to an equation is a waste of time and effort. $\endgroup$
    – J. M.'s torpor
    Mar 8 '18 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.