Problem Background
I'm playing with a 3d environment where i (the camera) am at the center of a sphere (both the camera and the center of the sphere are positioned at the 0,0,0 origin point) and the sphere has a 360 degree image mapped onto it like http://core0.staticworld.net/images/article/2015/08/360-degree-ricoh-theta-100609103-large.jpg
from my center perspective everything looks proper without any warping like the outside looking in perspective in the previous image. and in my sphere i have marked the boundaries of the hallway floor which yields a long trapezoidal plane. Like when you see the horizon/vanishing point for a long road.
Problem
The question is: what is the process to calculate the length of the hallway (in 3d environment units) as a rectangular plane (the true shape of the hallway) instead of the trapezoidal one that i marked for myself?
This answer is my own comment space.
Aw well.. you are 5 then... you have a line on the surface of the sphere, then you have a second and a third, they all sum as normally. And if you have a cross made by an horizontal line and a vertical line, and you move it over the surface, then whenever you see, you will see a cross, not another shape. So if you see a trapezoid over the surface, if you move it everywhere, you will still be viewing the same trapezoid!
Perspective is a different animal. You don't want to mess with that, yet. By now, you only have a single sphere surface, and rectangles over it.
Let mess everything now. Assume you have a sphere of radius $\rho$. Two points $p_1$, $p_2$ will have the following coordinates: $$ p_i=(\phi_i,\theta_i), \phi-i \in [-\pi,\pi], \theta \in [-\frac\pi2, \frac\pi2] $$ The angular distance, this is the path between them through the sphere, is then: $$ \varphi=\text{acos} (\sin(\theta_1)\sin(\theta_2)+cos(\theta_1)cos(\theta_2)(\phi_1-\phi_2))\\ d=\rho \varphi $$ This line will be viewed as a $\varphi$ angle from the camera.
Hence, your trapezoid will measure ${d\over\rho_i}$ at each vertical side, when $d$ is the real world length and the $\rho_i$ are the real world distances.