title: Switching from perspective to orthogonal keeping the same view size of model and zooming
body: <p>I have <code>fov</code> angle = 60, <code>width</code> = 640 and <code>height</code> = 480 of window, <code>near</code> = 0.01 and <code>far</code> = 100 planes  and I get projection matrix using <code>glm::perspective()</code></p>
  
  <pre class="lang-cpp prettyprint-override"><code>glm::perspective(glm::radians(fov),
                                width / height,
                                zNear,
                                zFar);
  </code></pre>
  
  <p>It works well.</p>
  
  <p>Then I want to change projection type to orthogonal, but I don't knhow how to compute input parameters of <code>glm::ortho()</code> properly.
  I've tried many ways, but problem is after switching to orthographic projection size of model object become another.  </p>
  
  <p>Let I have a cube with center in (0.5, 0.5, 0.5) and length size 1, and camera with mEye in (0.5, 0.5, 3), mTarget in (0.5, 0.5, 0.5) and mUp (0, 1, 0). View matrix is <code>glm::lookAt(mEye, mTarget, mUp)</code>
  With perspective projection it works well. With <code>glm::ortho(-width, width, -height, height, zNear, zFar)</code> my cube became a small pixel in the center of window. 
  Also I've tried implement this variant <a href="https://stackoverflow.com/questions/48187416/how-to-switch-between-perspective-and-orthographic-cameras-keeping-size-of-desir">How to switch between Perspective and Orthographic cameras keeping size of desired object</a>
  but result is (almost) same as before.</p>
  
  <p><strong>So, first question is how to compute ortho parameters for saving original view size of object/position of camera?</strong></p>
  
  <p>Also, zooming with </p>
  
  <pre><code>auto distance = glm::length(mTarget - mEye)
  mEye = mTarget - glm::normalize(mTarget - mEye) * distance;
  </code></pre>
  
  <p>have no effect with ortho. <strong>Thus second question is how to implement zooming in case of ortho projection?</strong></p>
  
  <p>P.s.
  I assume I understand ortho correctly.  Proportions of model doesn't depends on depth, but nevertheless I still can decide where camera is for setting size of model properly and using zoom. Also I assume it is simple and trivial task, for example, when developing a 3D-viewer/editor/etc. Correct me if it is not.</p>