There is a point cloud inside a sphere of radius r
, and the coordinate system of these points is in the center of the sphere. The idea is to "take photos" of this cloud since there are many points of view in the surface of the sphere. The "camera" position depends on the angles theta (azimuths) and phi (elevation), as shown in the image. I need at least 10000 images or points of view.
How could I handle this?
I have done:
Following this link I've projected the points to each plane as I also needed to visualize them in 3D. Like this:
So I have the coordinates of the projected points who belong to the plane of the "photo" but still with the original coordinate system.
The plane is defined by:
U = {-sin(theta), cos(theta), 0}
V = {cos(theta)*sin(phi), sin(theta)*sin(phi), cos(phi)}
Center = {cos(theta)*cos(phi), sin(theta)*cos(phi), sin(phi)}*r
But I am blocked passing from 3D to 2D.
Each point P
's projected coordinates in the plane's own basis [U, V]
are given by
[x', y'] = [dot(P - Center, U), dot(P - Center, V)]
To convert this to world coordinates simply do
world_coord = Center + U * x' + V * y'
(Let me know if I've misunderstood your question)