# Projecting a stretched grid to the unit disk?

What is happening mathematically in this image? How does one represent the grid on the ball mathematically?

I've observed that there seem to be four points at infinity in which grid lines meet. I would also say I think this is in the scope of spherical geometry.

Q: If you projected the grid on the transparent ball down onto a disk, would this projection be an isometry? Would the transformation be conformal?

I don't think it would be an isometry but I think it could be conformal.

• en.wikipedia.org/wiki/Snell%27s_law Commented Oct 13, 2019 at 20:13
• Is that a glass ball, or is it a reflective ball? Commented Oct 13, 2019 at 20:42
• It’s a glass ball Commented Oct 13, 2019 at 22:11
• Oh, well. Then the first step really is Snell's Law, combined with everything you learn about raytracing in just about any graphics book. If it were a reflective sphere, then the "curvy" black lines might (if you had a camera with a really long focal length) actually be circle-arcs; once you throw in the snell-refraction law, I pretty much doubt it. Commented Oct 13, 2019 at 22:28
• Just a hunch... If the ball is a reflective hyperboloid of 1 sheet then the lines imaged on far-off /high $f$ camera would be circles. Commented Oct 14, 2019 at 5:53

This seems to be a ball lens. Here is some Mathematica code that symbolically performs the raytracing using Snell's law:

p0y = 0;
u0x = 1;
Clear[p0x, u0y, index, wall]

p0 = {p0x, p0y};
u0 = {u0x, u0y};

p1 = ((p0 +
t*u0) /. (Solve[Norm[p0 + t*u0]^2 == radius^2, t] // First //
Simplify)) // Simplify;(*intersection with ball surface*)

u0normal = (u0.p1)*p1;
u0perp = u0 - u0normal;
u1 = (u0normal + u0perp/index) //
Simplify;(*Snell's law*)
p2 = ((p1 +
t*u1) /. (Solve[Norm[p1 + t*u1]^2 == radius^2, t] // Last //
Simplify)) // Simplify;(*intersection with ball surface*)

u1normal = (u1.p2)*p2;
u1perp = u1 - u1normal;
u2 = (u1normal + u1perp*index) //
Simplify;(*Snell's law*)
p3 = ((p2 +
t*u2) /. (Solve[(p2 + t*u2).{1, 0} == wall, t] // First //
Simplify)) //
Simplify;(*intersection with wall, this may not be a valid solution \
since the ray exiting the ball may point away from the wall*)

p4 = ((p0 + t*u0) /. (Solve[(p0 + t*u0).{1, 0} == wall, t] // First //
Simplify)) // Simplify;(*intersection with wall*)

Manipulate[
Evaluate@Graphics[{
InfiniteLine[{wall, 0}, {0, 1}],
HalfLine[p2, u2],
Line[{p0, p1, p2}],
Dotted,
HalfLine[p1, u0]
}, PlotRange -> {{-10, 10}, {-10, 10}}]
,
{{p0x, -4, "distance from eye to ball center"}, -4, -1},
{{u0y, 0.25, "slope of line of sight"}, -2, 2},
{{index, 20, "relative refractive index of ball"}, 0, 1000},
{{wall, 2, "distance from ball center to wall"}, 1, 10}
]


Here is a screenshot:

Note that the exiting ray may point away from the wall behind the ball. Let $$d_1$$ be the distance from the eye to the ball center and $$d_2$$ be the distance from the ball center to the wall behind it. Then, as the refractive index approaches infinity, the actual viewing angle (relative to the center of your field of vision when looking at the center of the ball) as a function of the apparent viewing angle $$a$$ is

(*f returns the actual angle as a function of apparent angle*)
f[a_] = ArcTan[
Last[Limit[p3, index -> Infinity]]/(-p0x + wall) /. {u0y ->
u0x*Tan[a]}] // FullSimplify;
f[a] /. {p0x -> -Subscript[d, 1], wall -> Subscript[d, 2]} //

$$\cot ^{-1}\left(\frac{\left(d_1+d_2\right) \cot (a) \left(-2 d_1 \sqrt{\sec ^2(a)-d_1^2 \tan ^2(a)}-\csc ^2(a)+2 d_1^2\right)}{-d_2 \csc ^2(a)+d_1 \left(2 d_2 \cot ^2(a) \sqrt{\sec ^2(a)-d_1^2 \tan ^2(a)}-\csc ^2(a)\right)+2 d_1^2 d_2}\right)$$