Mathematicaで大きさ-角度ベクトルをどのようにプロットしますか?
Aug 17 2020
Mathematicaでこのかなり単純なベクトルを大きさと角度でプロットする方法に迷っています。どんな助けでもいただければ幸いです。前もって感謝します。
例:20 @ 50度の角度
回答
7 kglr Aug 18 2020 at 04:16
あなたは関数を使うことができますAnglePath:
{x, y} = {0, 0};
r = 20;
t = 50 Degree;
Graphics[{Red, Arrow @ AnglePath[{x, y}, {{r, t}}]}]

または、次を使用することもできますAngleVector。
Graphics[{Red, Arrow[{{x, y}, AngleVector[{r, t}]}]}]
同じ写真
6 NonDairyNeutrino Aug 18 2020 at 04:52
と
{r, t} = {20, 50 Degree}
あなたはいつでも数学的にベクトルを作ることができます
vec = r {Cos@t, Sin@t}
と実例
With[
{pt = r {Cos@t, Sin@t}(*Mathematical implementation of the vector*)},
Graphics[
{
(*Make all the lines thick*) Thickness[.007],
(*The arrow itself*){Arrow@{{0, 0}, pt}},
(*Arc to show label the angle*) {Circle[{0, 0}, 5, {0, 50 Degree}]},
(*Angle label*) {Text[Style[θ == 50 Degree, 15], 4 {0.85 Cos[t/2.5], 1.1 Sin[t/2.5]}]},
(*Magnitude label*) {Text[Style["r = 20", 15], pt {0.9, 1}]}
}
]
]
