2
$\begingroup$

how can I add the arrow symbol in Polar plot figure (see the attached file), from the point (0,0) to the tangent point?

code example:

theta = -45;
the = theta*Pi/180;
alp = 20;
gc = Sqrt[1 + alp*Cos[x - the]*Cos[x - the]];
yy = 1/gc;
f[x_] := Evaluate[yy {Cos[x], Sin[x]}]
tangent[x_] := Evaluate[Simplify@FrenetSerretSystem[f[x], x][[2, 1]]]

pts1 = N[x /. 
   Solve[{Divide @@ tangent[x] == 0, Pi <= x <= 2 Pi}, x, Reals]]

PolarPlot[yy, {x, 0, 2*Pi}, PolarAxes -> True, 
 PolarTicks -> {"Degrees", Automatic}, PolarGridLines -> True, 
 Mesh -> 0, MeshStyle -> Directive[PointSize[Large], Red], 
 Epilog -> {Text[
      Style[ToString[Round[#/Degree, .1]] <> "\[Degree]", 
       Black], {.1, .05} + (f@#)] & /@ Join[pts1], Thick, Purple, 
   PointSize[Large], Point[f /@ pts1], Magenta, Orange, 
   Line /@ ({{#, #2 - 1/2}, {#, #2 + 1/2}} & @@@ (f /@ pts1))}]

enter image description here

$\endgroup$
2
$\begingroup$
PolarPlot[yy, {x, 0, 2*Pi}, PolarAxes -> True, 
    PolarTicks -> {"Degrees", Automatic}, PolarGridLines -> True, 
    Mesh -> 0, MeshStyle -> Directive[PointSize[Large], Red], 
    ImagePadding -> Scaled[.075],
    Epilog -> {Text[Style[ToString[Round[#/Degree, .1]] <> "\[Degree]", 
         Black], {0, .05} + (f@#), Right] & /@ Join[pts1], 
      Thick,  Purple, PointSize[Large], Point[f /@ pts1],
      Red, Thickness[.01],  Arrowheads[Large], Arrow[Prepend[f /@ pts1, {0, 0}]], 
      Thick,  Magenta, Orange, Line /@ ({{#, #2 - 1/2}, {#, #2 + 1/2}} & @@@ (f /@ pts1))}]

enter image description here

$\endgroup$
  • $\begingroup$ thanks! can we move 221.3 deg to the left ? $\endgroup$ – ABCDEMMM Jun 19 at 0:14
  • 1
    $\begingroup$ @ABCDEMMM, please see the new version. $\endgroup$ – kglr Jun 19 at 0:22
  • $\begingroup$ thank you very much!!! $\endgroup$ – ABCDEMMM Jun 19 at 8:49
  • $\begingroup$ how can we increase the visual-size of 222.3, namely 2 times larger $\endgroup$ – ABCDEMMM Jul 30 at 17:58
  • 1
    $\begingroup$ @ABCDEMMM, change Style[ToString[Round[#/Degree, .1]] <> "\[Degree]", Black] to Style[ToString[Round[#/Degree, .1]] <> "\[Degree]", 16, Black] (or use your choice of font size in place of 16). $\endgroup$ – kglr Jul 30 at 18:04

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.