0

If this question is more suited for the Mathematics stack exchange, please let me know.

I know the basic idea of vector images: images are represented by mathematical equations, rather than a bitmap, which makes them infinitely scalable.

Computing this seems straight forward for something like a straight line, but for one that is more complex, such as:

https://www.wolframalpha.com/input/?i=zoidberg-like+curve

I am wondering how would the program even begin to produce that equation as the output.

Does it break the image into little curve segments and try to approximate each one? What if a large, multi-segment part of an image could be represented efficiently using only one equation, but because the computer only "sees" one segment at a time, it doesn't realize this. Would the computer test every combination of segments?

I was just curious and wondering if anyone could provide a high-level description of the basic process.

As an example, consider an image represented by equation (1):

enter image description here

y = abs(x)

It could also be represented as (2):

y = -x (-inf, 0)
y = x (0, inf)

But you would only be able to figure out that it could be represented as (1) if you knew what the entire image looked like. If you were scanning from left to right and trying to represent the image as an equation, then you would end up with (2).

gallardoelise
  • 342
  • 3
  • 17
  • 1
    I'm voting to close this question since it isn't really about programming, but [this video on YouTube](https://www.youtube.com/watch?v=r6sGWTCMz2k) should explain everything you need to know. – r3mainer Jan 24 '20 at 10:22
  • I'm voting to close this question as off-topic because it's about mathematics, not programming. – r3mainer Jan 24 '20 at 10:22
  • Very helpful, thanks! "Fourier Transform" is the key phrase I needed to start learning more - just didn't know where to start. – gallardoelise Jan 24 '20 at 10:28
  • "complex" in the title is misleading a lot should be complicated instead as "complex" implies complex domain functions which is another topic on its own. There are more approaches to obtain equation from a polyline/set of ordered points. see [How can i produce multi point linear interpolation?](https://stackoverflow.com/a/30438865/2521214) Some break down to piecewise patches (BEZIER,SPLINE,cubics... ) others create polynomials for whole set like Lagrange polynomial Others use Fourier series, FFT,DCT,DST or other methods (Chebyshew) others use Fitting. It depends on input data and wanted form – Spektre Jan 24 '20 at 13:03

0 Answers0