title: How are the mathematical equations for complex vector images calculated?
body: <p>If this question is more suited for the Mathematics stack exchange, please let me know.</p>
  
  <p>I know the basic idea of vector images: images are represented by mathematical equations, rather than a bitmap, which makes them infinitely scalable.</p>
  
  <p>Computing this seems straight forward for something like a straight line, but for one that is more complex, such as:</p>
  
  <p><a href="https://www.wolframalpha.com/input/?i=zoidberg-like+curve" rel="nofollow noreferrer">https://www.wolframalpha.com/input/?i=zoidberg-like+curve</a></p>
  
  <p>I am wondering how would the program even begin to produce that equation as the output.</p>
  
  <p>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?</p>
  
  <p>I was just curious and wondering if anyone could provide a high-level description of the basic process.</p>
  
  <p>As an example, consider an image represented by equation (1):</p>
  
  <p><a href="https://i.stack.imgur.com/6RFe8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RFe8.png" alt="enter image description here"></a></p>
  
  <pre><code>y = abs(x)
  </code></pre>
  
  <p>It could also be represented as (2):</p>
  
  <pre><code>y = -x (-inf, 0)
  y = x (0, inf)
  </code></pre>
  
  <p>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).</p>