I recently asked a question: Finding Intersections Between Arbitrary Surface and A Line whose solution required me to use the GroebnerBasis
function. I successfully applied the solution to several other cases, but am having trouble acquiring a basis for the following parametrization. Essentially, I was trying to find the intersections of an arbitrary surface with a line. The problematic surface is defined as:
M = 0; phi = Pi/2;
t = 1; t2 = 0.5; t3 = 0.35;
b1 = {{-Sqrt[3]/2}, {3/2}};
b2 = {{-Sqrt[3]/2}, {-3/2}};
b3 = {{Sqrt[3]}, {0}};
hx[kx_, ky_] :=
t ((1 + Cos[{kx, ky}.b1] + Cos[{kx, ky}.b2])) +
t3 (2 Cos[{kx, ky}.(b1 + b2)] + Cos[{kx, ky}.(b1 - b2)]);
hy[kx_, ky_] :=
t ((Sin[{kx, ky}.b1] - Sin[{kx, ky}.b2])) +
t3 Sin[{kx, ky}.(b1 - b2)];
hz[kx_, ky_] :=
M - 2 t2 Sin[
phi] (Sin[{kx, ky}.b1] + Sin[{kx, ky}.b2] + Sin[{kx, ky}.b3])
H[kx_, ky_] =
Flatten[{hx[kx, ky], hy[kx, ky], hz[kx, ky]}, 1] // Simplify;
I tried getting a basis using the following:
eqs = Thread[{x, y,
z} == {t ((1 + Cos[{kx, ky}.b1] + Cos[{kx, ky}.b2])) +
t3 (2 Cos[{kx, ky}.(b1 + b2)] + Cos[{kx, ky}.(b1 - b2)]),
t ((Sin[{kx, ky}.b1] - Sin[{kx, ky}.b2])) +
t3 Sin[{kx, ky}.(b1 - b2)],
M - 2 t2 Sin[
phi] (Sin[{kx, ky}.b1] + Sin[{kx, ky}.b2] + Sin[{kx, ky}.b3])}]
impl = GroebnerBasis[Join[TrigExpand[eqs],
{Cos[(Sqrt[3] kx)/2 - 3 ky/2]^2 +
Sin[(Sqrt[3] kx)/2 - 3 ky/2]^2 == 1,
Cos[(Sqrt[3] kx)/2 + 3 ky/2]^2 +
Sin[(Sqrt[3] kx)/2 + 3 ky/2]^2 == 1,
Cos[(Sqrt[3] kx)]^2 + Sin[(Sqrt[3] kx)]^2 == 1,
Cos[(3 ky)]^2 + Sin[(3 ky)]^2 == 1}],
{x, y, z},
{Cos[(Sqrt[3] kx)/2 - 3 ky/2],
Sin[(Sqrt[3] kx)/2 - 3 ky/2],
Cos[(Sqrt[3] kx)/2 + 3 ky/2],
Sin[(Sqrt[3] kx)/2 + 3 ky/2],
Cos[(Sqrt[3] kx)],
Sin[(Sqrt[3] kx)],
Cos[(3 ky)],
Sin[(3 ky)]}][[1]] // FullSimplify
However, I get 0
as the answer, instead of an equation of three variables.
I apologize if this question is too specific, but does anyone see what I am doing wrong? Thanks!
TrigExpand[]
is that we are helpingGroebnerBasis[]
out by making sure all cosines and sines are of the formf[c u]
withu
being either ofkx
orky
. So, you should not need to put in something likeCos[(Sqrt[3] kx)/2 - 3 ky/2]^2 + Sin[(Sqrt[3] kx)/2 - 3 ky/2]^2 == 1
, and the extra Pythagorean relations you need should beCos[(Sqrt[3] kx)/2]^2 + Sin[(Sqrt[3] kx)/2]^2 == 1
andCos[ky/2]^2 + Sin[ky/2]^2 == 1
. $\endgroup$b1
and the other ones as $2 \times 1$ matrices? If you set them up as vectors, you wouldn't have to useFlatten[]
at the end. Have you seen this? $\endgroup$impl
=-1. + Cos[0.5 ky]^2 + Sin[0.5 ky]^2
is simply 0 withFullSimplify
. Do you have any ideas as to how I would solve for intersections in this case? (And thanks for the reference! My biggest excuse is that I started working on this with MATLAB and wasn't efficient with translating to Mathematica, but I need to change this.) $\endgroup$TrigExpand[]
. Pair up what you can with the Pythagorean relation, and add those conditions. Then you can do your Gröbner basis. $\endgroup$