3
$\begingroup$

I am lost on how to plot this fairly simple vector with a magnitude and an angle in Mathematica. Any help would be appreciated. Thanks in advance.

e.g. 20 @ 50 Degree Angle

$\endgroup$
7
$\begingroup$

You can use the function AnglePath:

{x, y} = {0, 0};
r = 20;
t = 50 Degree;
Graphics[{Red, Arrow @ AnglePath[{x, y}, {{r, t}}]}]

enter image description here

Alternatively, you can use AngleVector:

Graphics[{Red, Arrow[{{x, y}, AngleVector[{r, t}]}]}]

same picture

$\endgroup$
6
$\begingroup$

With

{r, t} = {20, 50 Degree}

You can always make the vector mathematically with

vec = r {Cos@t, Sin@t}

and an illustrative example

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}]}
   }
  ]
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.