I am trying to find the intersection points of two ellipses, given in a parametric form:
a = 1;
e = 0.7;
ϕ = π/6;
rotv = Normalize@{1, -1, 0};
x[θ_] := -a*e + a*Cos[θ];
y[θ_] := a Sqrt[1 - e^2]*Sin[θ];
rot = RotationMatrix[ϕ, rotv];
Solve[{x[θ1], y[θ1], 0} ==
rot.{x[θ2], y[θ2], 0}, {θ1, θ2}]
But with this I get an empty output {}
.
But if I do:
el1[θ_] = {x[θ], y[θ], 0};
el2[θ_] = rot.{x[θ], y[θ], 0};
Solve[el2[t][[3]] == 0, t]
(*{{t -> -0.344559}, {t -> 1.58487}}*)
and
el1[-0.3445591705449694`]
el2[-0.3445591705449694`]
(*{0.241224, -0.241224, 0}*)
(*{0.241224, -0.241224, 0.}*)
so the solution exists but I wonder why, the above approach does not yield a result? (there is a similar question here but I do not really understand it much, I am basing my attempt on this)
Solve
? I don't think it's necessary. And by using the univariate form (what you more or less do in your second case) and by restricting the domain of the solutions (since it's parametrized and you only need one full orbit) you can get it to work. Alternatively you can remove the values for the coefficients and it will spit out the exact answer. $\endgroup$NMinimize[ Norm[{x[\[Theta]1], y[\[Theta]1], 0} - rot.{x[\[Theta]2], y[\[Theta]2], 0}], {\[Theta]1, \[Theta]2}]
$\endgroup$e=0.7;
toe=7/10;
? $\endgroup$Solve
will fail if it needs to resort to numerical methods. A better approach to this is to note the solution is where the rotation vector intersects the first ellipse, soSolve[{x[t], y[t]} == c rotv[[1 ;; 2]] , {c, t}]
(Which will work with inexact parameters ) $\endgroup$