Background: my JavaScript library https://github.com/mistic100/Photo-Sphere-Viewer allows to create 2D polygons overlaying a spherical photo. Polygons are defined by a serie a longitude/latitude points. Spherical coordinates are then projected on the camera near frustrum. This works for small polygons but not for big ones when points are behind the camera.
Long story short: I would like to compute intermediary points on the circle delimiting the "front half-sphere" (the one rendered by the camera).
The question:
We have :
- a red sphere centered on 0,0,0 of radius 1
- a black circle of radius 1 and always centered on 0,0,0. So this circle can be any big circle of the sphere.
- An blue arc BD on the sphere surface (here there are 3 arcs but the question is only for one). The arc is only known by its points B and D, only the shortest arc between these points is interesting.
Want I need : the coordinates of point H, intersection of arc BD and the black circle.
I only have basic trigonometry knowledge (I forgot almost all my math courses !) and I can't get my head of this and find where to start...
Thank you
