TikZ: Arrow pointing to circle from inside through two points

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
4
down vote

favorite












Originally posted here; this comment suggested that I ask this question on this site instead.



The code at the bottom produces the correct drawing, shown below. The issue is that I don't think I drew it in the best way possible; in particular, I really don't like having to construct (X) or (Y) (I would rather specify that the radius is 2 and that the ray should go in the direction of (p)).



Can someone show me a better way?



begintikzpicture
node [fill=black, shape=circle, inner sep=1pt, label=below:$O$] (O) at (0,0) ;
node [fill=black, shape=circle, inner sep=1pt, label=below:$p$] (p) at (0.6,1.2) ;
node [fill=black, shape=circle, inner sep=1pt, label=below:$f(p)$] (fp) at
(-1.2,0.7) ;
coordinate (X) at (2,0);
coordinate (Y) at (2.4, 1.7);
node (C) [name path=C, draw, circle through=(X)] at (O) ;
path [name path=fp--Y] (fp)--(Y);
path [name intersections=of=fp--Y and C, by=F];
node [fill=black, shape=circle, inner sep=1pt, label=right:$r(p)$] (rp) at (F) ;
draw [->] (fp)--(rp);
endtikzpicture


Correct output







share|improve this question

























    up vote
    4
    down vote

    favorite












    Originally posted here; this comment suggested that I ask this question on this site instead.



    The code at the bottom produces the correct drawing, shown below. The issue is that I don't think I drew it in the best way possible; in particular, I really don't like having to construct (X) or (Y) (I would rather specify that the radius is 2 and that the ray should go in the direction of (p)).



    Can someone show me a better way?



    begintikzpicture
    node [fill=black, shape=circle, inner sep=1pt, label=below:$O$] (O) at (0,0) ;
    node [fill=black, shape=circle, inner sep=1pt, label=below:$p$] (p) at (0.6,1.2) ;
    node [fill=black, shape=circle, inner sep=1pt, label=below:$f(p)$] (fp) at
    (-1.2,0.7) ;
    coordinate (X) at (2,0);
    coordinate (Y) at (2.4, 1.7);
    node (C) [name path=C, draw, circle through=(X)] at (O) ;
    path [name path=fp--Y] (fp)--(Y);
    path [name intersections=of=fp--Y and C, by=F];
    node [fill=black, shape=circle, inner sep=1pt, label=right:$r(p)$] (rp) at (F) ;
    draw [->] (fp)--(rp);
    endtikzpicture


    Correct output







    share|improve this question





















      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      Originally posted here; this comment suggested that I ask this question on this site instead.



      The code at the bottom produces the correct drawing, shown below. The issue is that I don't think I drew it in the best way possible; in particular, I really don't like having to construct (X) or (Y) (I would rather specify that the radius is 2 and that the ray should go in the direction of (p)).



      Can someone show me a better way?



      begintikzpicture
      node [fill=black, shape=circle, inner sep=1pt, label=below:$O$] (O) at (0,0) ;
      node [fill=black, shape=circle, inner sep=1pt, label=below:$p$] (p) at (0.6,1.2) ;
      node [fill=black, shape=circle, inner sep=1pt, label=below:$f(p)$] (fp) at
      (-1.2,0.7) ;
      coordinate (X) at (2,0);
      coordinate (Y) at (2.4, 1.7);
      node (C) [name path=C, draw, circle through=(X)] at (O) ;
      path [name path=fp--Y] (fp)--(Y);
      path [name intersections=of=fp--Y and C, by=F];
      node [fill=black, shape=circle, inner sep=1pt, label=right:$r(p)$] (rp) at (F) ;
      draw [->] (fp)--(rp);
      endtikzpicture


      Correct output







      share|improve this question











      Originally posted here; this comment suggested that I ask this question on this site instead.



      The code at the bottom produces the correct drawing, shown below. The issue is that I don't think I drew it in the best way possible; in particular, I really don't like having to construct (X) or (Y) (I would rather specify that the radius is 2 and that the ray should go in the direction of (p)).



      Can someone show me a better way?



      begintikzpicture
      node [fill=black, shape=circle, inner sep=1pt, label=below:$O$] (O) at (0,0) ;
      node [fill=black, shape=circle, inner sep=1pt, label=below:$p$] (p) at (0.6,1.2) ;
      node [fill=black, shape=circle, inner sep=1pt, label=below:$f(p)$] (fp) at
      (-1.2,0.7) ;
      coordinate (X) at (2,0);
      coordinate (Y) at (2.4, 1.7);
      node (C) [name path=C, draw, circle through=(X)] at (O) ;
      path [name path=fp--Y] (fp)--(Y);
      path [name intersections=of=fp--Y and C, by=F];
      node [fill=black, shape=circle, inner sep=1pt, label=right:$r(p)$] (rp) at (F) ;
      draw [->] (fp)--(rp);
      endtikzpicture


      Correct output









      share|improve this question










      share|improve this question




      share|improve this question









      asked Apr 6 at 14:41









      alphacapture

      16015




      16015

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "196"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f191414%2ftikz-arrow-pointing-to-circle-from-inside-through-two-points%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f191414%2ftikz-arrow-pointing-to-circle-from-inside-through-two-points%23new-answer', 'question_page');

          );

          Post as a guest













































































          qXWoF,Ubum1oyWq,rqY2,M9Rrtl6TYL4pejgZ,pSt8JNajWXukk2DKQrGXn8ymrTeHvyEIQdbT3 5bvTwBU26 HjAtIKy
          kdWpq7 wl,1GH,VDPeEwe c2UiA6Av

          Popular posts from this blog

          Chat program with C++ and SFML

          Function to Return a JSON Like Objects Using VBA Collections and Arrays

          Read an image with ADNS2610 optical sensor and Arduino Uno