On Looking for The Eclipse
Ensemble au clair-obscur
The orbits of the two bodies are elliptical and centered about the origin. In other words, they are expressed using the following function of time: u*cos(ωt)+v*sin(ωt); where
uandvare two non-colinear vectors.ωis the frequency of the orbit.tis the time shown on the module.
However, for this function to be usable, each position must be converted into (x,y,z) form, from (δ,φ,θ). To convert between the two, observe the following relations:
x = δ*cos(φ)*cos(θ)y = δ*sin(φ)*cos(θ)z = δ*sin(θ)δ = sqrt(x^2+y^2+z^2)φ = atan2(y,x)θ = asin(z/δ)
Then, to find the ellipse in 3D space, the ellipse within the plane it resides in must be found. To do this, first gather 5 points on the ellipse, and project them onto their common plane. Note that this plane always includes the origin.
After that, calculate 6 values using 6 matrices with the following criteria:
- The first matrix has rows in the form
[xi^2, xi*yi, yi^2, xi, yi]for each point(xi, yi). - Each matrix after that has each entry within each row, in reading order, replaced with
1.- For example, the first matrix created in this step has each row as
[1, xi*yi, yi^2, xi, yi]
- For example, the first matrix created in this step has each row as
- Label each matrix created, in order, as
W,WA,WB,WC,WD,WE. - Calculate the following values:
A = det(WA)/det(W)B = det(WB)/det(W)C = det(WC)/det(W)D = det(WD)/det(W)E = det(WE)/det(W)F = -A*xi^2-B*xi*yi-C*yi^2-D*xi-E*yi
Fshould always be-1.