I have the expression of a vector e, with 3 parameters tt1 tt2 and tt3:
e1 = -(Sin[tt1]*Sin[tt2])/2 - (Sin[tt2]*Sin[tt3])/2
e2 = (Cos[tt1]*Sin[tt2])/2 - (Cos[tt3]*Sin[tt2])/2
e3 = (Cos[tt1]*Cos[tt2]*Sin[tt3])/2 - (Cos[tt3]*Sin[tt1])/2 -
(Cos[tt1]*Sin[tt3])/2 + (Cos[tt2]*Cos[tt3]*Sin[tt1])/2
e = {e1, e2, e3};
and the range of tt1
to tt3
are all from 0 to 2 Pi
. In this case, since we have 3 parameters, the endpoints of e should form a region rather than a surface, and I'd like to plot this region, or its boundary (preferably both).
The only relevant command I found is the RegionPlot3D
command, but seems that one handles the Cartesian coordinates with inequalities as constraints, which is not true in my case.
Could someone give me a hand?
Update
When I try this code:
GroebnerBasis[
{e1 == -(Sin[tt1]*Sin[tt2])/2 - (Sin[tt2]*Sin[tt3])/2,
e2 == (Cos[tt1]*Sin[tt2])/2 - (Cos[tt3]*Sin[tt2])/2,
e3 == (Cos[tt1]*Cos[tt2]*Sin[tt3])/2 - (Cos[tt3]*Sin[tt1])/2 -
(Cos[tt1]*Sin[tt3])/2 + (Cos[tt2]*Cos[tt3]*Sin[tt1])/2,
Cos[tt1]^2 + Sin[tt1]^2 == 1,
Cos[tt3]^2 + Sin[tt3]^2 == 1},
{e1, e2, e3},
{Cos[tt1], Sin[tt1], Cos[tt3], Sin[tt3]}]
it gives me an error:
General::ivar: -(1/2)Cos[tt3]Sin[tt1] + 1/2Cos[tt2]Cos[tt3]Sin[tt1] - 1/2 Cos[tt1]Sin[tt3] + 1/2Cos[tt1]Cos[tt2]Sin[tt3] is not a valid variable.
I thought that Groebner basis is used for solving equations, but in my case, I'm not trying to solve e1 == e2 == e3 == 0
, instead, I'm trying to plot the region that can be traced by the endpoints of e
. Besides, tt1
, tt2
and tt3
are independent variables, so I doubt if we could eliminate some of them, when I'm trying to plot the boundary of the region?
Update II
To Andre: thanks a lot, I tried the code in the link, and it probably gives me the correct result. Now that I have this region, I wonder if I can do some further operations, such as obtaining some intersection of this region about some plane, for example the plane $x+y=0$? Moreover, can I get the volume of this region?
The above answer should have already solved my problem, but I'm kind of curious about the method using the Grobener basis, as well, because I can hardly understand the code in the above link (sorry I'm quite new to Mathematica).
You guys are right, the code works after I clear the variables, sorry for the mistake.. Now the code gives me:
{e1^4 + 2 e1^2 e2^2 + e2^4 - 2 e1^4 Cos[tt2] - 4 e1^2 e2^2 Cos[tt2] -
2 e2^4 Cos[tt2] + e1^4 Cos[tt2]^2 + 2 e1^2 e2^2 Cos[tt2]^2 +
e2^4 Cos[tt2]^2 - e1^2 Sin[tt2]^2 - e2^2 Sin[tt2]^2 +
2 e1^2 Cos[tt2] Sin[tt2]^2 + 2 e2^2 Cos[tt2] Sin[tt2]^2 -
e1^2 Cos[tt2]^2 Sin[tt2]^2 - e2^2 Cos[tt2]^2 Sin[tt2]^2 +
e3^2 Sin[tt2]^4}
I wonder what I can do with this to plot the 3D region? Sorry if my question is silly.
GroebnerBasis[]
on your equation system, and arbitrarily leaving outtt2
in the elimination list yields an expression in terms ofe1
,e2
,e3
, andtt2
(which you can use as a parameter).GroebnerBasis[{e1 == ..., e2 == ..., e3 == ..., Cos[tt1]^2 + Sin[tt1]^2 == 1, Cos[tt3]^2 + Sin[tt3]^2 == 1}, {e1, e2, e3}, {Cos[tt1], Sin[tt1], Cos[tt3], Sin[tt3]}]
$\endgroup$e1
, etc. $\endgroup$ek
. UseClear[]
and try again. In any case, you can then useContourPlot3D[]
on a list of contours with varyingttk
. $\endgroup$