I want to map graph from one coordinate system to another, the aspect ratio must be preserved.
The change is:
x [-2, +2] to [0, 800]
y [-1.5, +1.5] to [0, 600]
I want to understand how such transformation is performed from a given old dimensions to new one. How does one go from old xmin, xman to new xmin, xmax and same for the y coordinates??
I assume that as long as the new and old system's aspect ratio is same, the image will not be stretched or compressed.
I only need a formula that shall make it possible to find what point in what system corresponds to what point in the other system.
The formula for linear-transformation is:
$$newVal=(oldVal-oldMin)\cdot\frac{newMax-newMin}{oldMax-oldMin}+newMin$$
Hence: