daan wrote: ↑Tue Aug 08, 2023 3:21 pmMy point, if I were to pursue it, would be to have some sort of deterministic formulæ so that it can be represented in software devoted to map projections. Using 3D modeling software, or scanning a photograph, doesn’t provide that.
What I mean is, you have your starting map in (
x0,
y0) coordinates. Then you can turn it into the 3D coordinates (
x1,
y1,
z1) with the transformation:
x1 =
f(
x0)
y1 =
y0
z1 =
g(
x0)
where
f and
g are functions satisfying
f'(
x)
2 +
g'(
x)
2 = 1. (
f should be a monotonic odd function,
g should be an even function. Both are allowed and expected to be nondifferentiable, but not discontinuous, at 0.)
Finally you perform an orthographic projection onto (
x2,
y2) from some arbitrary angle
θ:
x2 =
x1
y2 =
y1 sin
θ +
z1 cos
θ
(You can do a non-orthographic perspective projection with slightly more effort.)
In short:
x2 =
f(
x0)
y2 =
y0 sin
θ +
g(
x0) cos
θ
No cameras necessary.
If you're using the equirectangular projection as a base, then
x0 and
y0 are extremely easy to calculate. The hardest part is picking
f and
g to give a convincing "book page" shape, which is inherently somewhat arbitrary.
You could first pick your desired page shape as
z1 =
h(
x1), and then compute
f and
g as:
f(
x) = ∫ 1/√(
h'(
x)
2+1) d
x
g(
x) = ∫
h'(
x)/√(
h'(
x)
2+1) d
x
(Don't attempt to cancel the numerator copy of
h'(
x) into the square root denominator, you want it to be able to be negative.)