Simple imposter distortion estimation

W. Pasman, revised 23/10/1

d=distance between optimal viewpoint and imposter
dobj=distance between optimal viewpoint and frontside of object
ef=distance between imposter and front side of object
eb=distance between imposter and back side of object
r= radius of object (=ef+eb)
θ=distance (angle) from frontal view

Here distortion is the max angular displacement of pixels on the object's surface.

Front face Distortion

df[d_, ef_, θ_] := 
        Sqrt[(d^2) + (ef^2) - 2 d ef Cos[θ]];

γf[d_, θ_, dobj_, r_] := 
        Module[{ef}, 
ef = 
            d - dobj; 
ArcSin[
            ef Sin[θ]/
                df[d, ef, θ]]
];

Back face Distortion

db[d_, eb_, θ_] := 
      Sqrt[(d^2) + (eb^2) - 2 d eb Cos[π - θ]]

γb[d_, θ_, dobj_, r_] := 
        Module[
{eb}, 
eb = 
            dobj + 2 r  -  d; 
ArcSin[
            eb Sin[θ]/
                db[d, eb, θ]]
];

Plots

dobj = 5 ; r = 9 ; θ = 
        25 Degree ;

frontplot = 
      Plot[γf[d, θ, dobj, r], {d, dobj, 
          dobj + 2  r}]

backplot = 
      Plot[γb[d, θ, dobj, r], {d, dobj, 
          dobj + 2  r}]

Show[
      Graphics[{frontplot[[1]], Dashing[{ .03}], backplot[[1]]}], 
      Axes -> True, 
      AxesLabel -> {"d", "γ"}]

Note on this plot. Distance to front side of object is fixed dobj. So increasing distance to imposter d
shifts the imposter more towards the back face. Of cource distortion=0 when the imposter hits the back face.

Clear[dobj, d, r, θ]

Solve the equation of the two

Straightforward solving γf==γb this is not possible with Mathematica.
      Instead we solve Sin[γf]^2 == Sin[γb]^2 which introduces negative solution as well, which we drop after solving

Simplify[
      Solve[Sin[γf[d, θ, dobj, r]]^2 == 
          Sin[γb[d, θ, dobj, r]]^2, d]]

dequal = -(1/(2 (-1 + Cos[θ]))) (dobj + r - 
            2 (dobj + 
                  r) Cos[θ] + (Sqrt[(((dobj + r))^2) - 4 (r^2) Cos[θ] + 4 (r^2) Cos[θ]^2]))

Therefore the minimal error γ is

Simplify[γf[dequal, θ, dobj, 
          r]]  /.  {(Sqrt[(((dobj + r))^2) - 4 (r^2) Cos[θ] + 4 (r^2) Cos[θ]^2])  ->  sq}

Help a little in the simplification

Simplify[
      ArcSin[(((-dobj + r + sq - 2 r Cos[θ]) Cot[(θ/2)])/(2 ((Sqrt[(dobj^2) + dobj r + r (r + sq) - (dobj (r + sq) + 2 r (2 r + sq)) Cos[θ] + 2 r (dobj + 2 r) Cos[θ]^2])/(Sqrt[1 - Cos[θ]]))))]]

Simplify[% /. {(Sqrt[1 - Cos[θ]]) -> 
            Sqrt[2] Sign[Sin[θ/2]] Sin[θ/2]}]

Thus, γ is the minimum error achievable with imposter at optimal distance,
when viewed at distance r and angle θ

γ[dobj_, r_, θ_] := 
        Module[{sq}, 
sq = (Sqrt[(((dobj + r))^2) - 4 (r^2) Cos[θ] + 4 (r^2) Cos[θ]^2]); 
ArcSin[((Sqrt[1 - Cos[θ]]) (-dobj + r + sq - 
                      2 r Cos[θ]) Cot[(θ/2)])/(2 √((dobj^2) + dobj r + 
                        r (r + sq) - (dobj (r + sq) + 
                              2 r (2 r + sq)) Cos[θ] + 
                        2 r (dobj + 
                              2 r) Cos[θ]^2))]
];

γ[dobj_, r_, θ_] := 
        Module[{sq}, 
sq = (Sqrt[(((dobj + r))^2) - 4 (r^2) Cos[θ] + 4 (r^2) Cos[θ]^2]); 
Abs[
            ArcSin[(Cos[(θ/2)] (-dobj + r + sq - 
                        2 r Cos[θ]) )/((Sqrt[2]) √((dobj^2) + dobj r + r (r + sq) - (dobj (r + sq) + 
                                2 r (2 r + sq)) Cos[θ] + 
                          2 r (dobj + 
                                2 r) Cos[θ]^2))]]
];

γ[dobj, r, -θ] // N

Much simpler but rougher approximation

Put imposter just halfway the object, thus at distance d
It is suboptimal but not that bad, especially at larger distances at which we will use the imposter anyway.

γmin[dobj_, 
        r_, θ_] := (γf[dobj + r, θ, dobj, 
              r] + γb[dobj + r, θ, dobj, r])/2

γmin[dobj, r, θ] // N

Linear approximation as an inbetween solution?

Equations are pretty linear when we stay close to frontal view.
Sure that lines go through γ=0 at extremes
and we calculate γ in middle (d=dobj+r)

γfa[d_, θ_, dobj_, 
          r_] = γf[dobj + r, θ, dobj, r] (d - dobj)/
            r;

frontplot2 = 
      Plot[γfa[d, θ, dobj, r], {d, dobj, 
          dobj + 2  r}]

Show[
      Graphics[{frontplot[[1]], Dashing[{ .03}], frontplot2[[1]]}], 
      Axes -> True, 
      AxesLabel -> {"d", "γ"}]

Backplot item

γba[d_, θ_, dobj_, 
          r_] = -γb[dobj + r, θ, dobj, 
              r] (d - dobj - 2 r)/r;

backplot2 = 
      Plot[γba[d, θ, dobj, r], {d, dobj, 
          dobj + 2  r}]

Show[
      Graphics[{backplot[[1]], Dashing[{ .03}], backplot2[[1]]}], 
      Axes -> True, 
      AxesLabel -> {"d", "γ"}]

Solving the equation γfa==γba

Clear[dobj, r, d, e, θ, d2, γ]

Solve[γfa[d, θ, dobj, r] == γba[d, θ, dobj, 
          r], d]

Simplify[%]

θ = 10; 
    Plot3D[(dobj ArcSin[((r Sin[θ])/(Sqrt[(r^2) + (((dobj + r))^2) - 2 r (dobj + r) Cos[θ]]))] + (dobj + 
                  2 r) ArcSin[((r Sin[θ])/(Sqrt[(r^2) + (((dobj + r))^2) + 2 r (dobj + r) Cos[θ]]))])/(ArcSin[((r Sin[θ])/(Sqrt[(r^2) + (((dobj + r))^2) - 2 r (dobj + r) Cos[θ]]))] + 
            ArcSin[((r Sin[θ])/(Sqrt[(r^2) + (((dobj + r))^2) + 2 r (dobj + r) Cos[θ]]))]), {r, 1, 5}, {dobj, 1, 10}]

Problem with this is that I dont have clear picture of
how good a linear approximation is really

Yet another approach with some trigo

Assume imposter in the middle. Largest distortion probably at front side.
dobj is to front side of object, as usual.

γfront[dobj_, r_, θ_] := 
        ArcTan[r Sin[θ]/(r + dobj)];

Plot[γfront[4500, 547, θ], {θ, 0, 
        5  Degree}]