I have data which are the longitudes (l) and latitudes (b) for the vertices of the edges of a shape as it appears to an observer at a given location (i.e., as it appears on the observer's sky plane).
Question: If I have some general idea what the original 3D object is (e.g., a surface of revolution formed from a lemniscate), how do I find the parameters of the 3D shape that best reproduce the 2D image the observer sees?
The data are (in degrees)
data = {{0, 0}, {-5.5, 5.}, {-10.7, 10.}, {-12.9, 15.}, {-15., 20.}, {-16.3, 25.}, {-16., 30.}, {-15.5, 35.}, {-15., 40.}, {-15., 45.}, {-10.6, 50.}, {-3.7, 52.5}, {6.3, 53.5}, {13.8, 50.}, {21.8, 45.}, {25.3, 40.}, {26.7, 35.}, {26.3, 30.}, {25.6, 25.}, {23., 20.}, {18.8, 15.}, {13.8, 10.}, {0, 0}}
In 3-space the observer is located at {xobs,yobs,zobs} = {-8,0,0} and I can assume the 3D object emanates from {0,0,0}
The transformation from general {x,y,z} to the angular position, {l,b}, on the observer's sky plane is given by
long[{x_, y_, z_}, {xobs_, yobs_, zobs_}] := ArcTan[(y - yobs)/(x - xobs)]
lat[{x_, y_, z_}, {xobs_, yobs_, zobs_}] := ArcTan[(z - zobs)/Sqrt[(x - xobs)^2 + (y - yobs)^2]]
As an example, take it that I know the 3D object is a surface of revolution formed from a lemniscate
lemSurface[x_, y_, z_, xa_, ya_, za_, c_] := (x^2 + y^2 + z^2)^2-2c^2(-(xa y - x ya)^2-(xa z - x za)^2-(ya z - y za)^2+(x xa + y ya + z za)^2)
The surface is given implicitly by
lemSurface[x, y, z, xa, ya, za, c]==0
where {xa, ya, za} is the vector around which the lemniscate is rotated and c scales its size.
So my question reduces to: how can I find the values for
xa, ya, za, c
such that the projected image best fits
data ?
One way to find the {x,y,z} coordinates of the edge of the object as it appears to the observer is that these are given implicitly by the requirement that these are
i) on the surface and ii) the observer is in the tangent plane for that coordinate on the surface.
The surface normal is given by
D[lemSurface[x, y, z, xa, ya, za, c], {{x, y, z}}]
The tangent plane at any point on the surface {xs,ys,zs} is then
D[lemSurface[xs, ys, zs, xa, ya, za, c], {{xs, ys, zs}}]).{x-xs,y-ys,z-zs}
so that the {x,y,z} coordinates of the edge of the object seen by the observer are given implicitly by
\[ScriptCapitalR] = ImplicitRegion[lemSurface[x, y, z, xobs, yobs, zobs, xa, ya, za, c] == 0 && D[lemSurface[x, y, z, xa, ya, za, c], {{x, y, z}}]).{xobs-x,yobs-y,zobs-z}== 0, {x, y, z}]
I can plot the [ScriptCapitalR] is 3 space via
DiscretizeRegion[\[ScriptCapitalR]]
but this still does not give me the {l,b} coordinates of the projected image or allow me to fit the image of the implicit region to data. I guess ideally what I want is a function for the appearance of the silhouette from the observer position that can be fitted to the observed data, i.e.,
silhouette[l_ ,b_, xa_, ya_, za_, c_, xobs_, yobs_, zobs_] == 0