title: JS: convert 2D matrix into another?
body: <p>I have a 2D matrix with an -1000 to + 1000 X/Y coordinate system.
  For plotting purposes, I want to transform that into another coordinate system, where 0,0 is at the top left.
  Any idea how to do that? I know how to do a linear projection of a single axis, but doing that independently yields distortions, especially if the origin matrix is not really rectangular like the target.</p>
  <p>Sample data:</p>
  <pre><code>[{ &quot;type&quot;: 2, &quot;x&quot;: 201, &quot;y&quot;: -201 }, { &quot;type&quot;: 2, &quot;x&quot;: 201, &quot;y&quot;: -200 }, { &quot;type&quot;: 2, &quot;x&quot;: 201, &quot;y&quot;: -199 }]
  </code></pre>
  <p>Type here is an information about the nature of the point.</p>
  <p>I would have liked to post more code, but I am at a loss how the mathematical operation is called...</p>