Circles touching path











up vote
5
down vote

favorite
1












That is what I have so far:



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
usetikzlibrary{intersections,decorations}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
draw[gray] (A) circle (.3);
draw[gray] (B) circle (.375) node[black,anchor=north] {$x_0$};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
draw[gray] (C) circle (.3);
node[blue,anchor=south west] at (D) {$S$};

end{tikzpicture}

end{document}


which looks like



enter image description here



Now, I want to add two dashed lines at each side of S going from the beginning and end of S touching the circles exactly such that each circle stays within.



Something like:



enter image description here










share|improve this question
























  • There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
    – marmot
    Nov 27 at 14:49















up vote
5
down vote

favorite
1












That is what I have so far:



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
usetikzlibrary{intersections,decorations}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
draw[gray] (A) circle (.3);
draw[gray] (B) circle (.375) node[black,anchor=north] {$x_0$};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
draw[gray] (C) circle (.3);
node[blue,anchor=south west] at (D) {$S$};

end{tikzpicture}

end{document}


which looks like



enter image description here



Now, I want to add two dashed lines at each side of S going from the beginning and end of S touching the circles exactly such that each circle stays within.



Something like:



enter image description here










share|improve this question
























  • There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
    – marmot
    Nov 27 at 14:49













up vote
5
down vote

favorite
1









up vote
5
down vote

favorite
1






1





That is what I have so far:



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
usetikzlibrary{intersections,decorations}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
draw[gray] (A) circle (.3);
draw[gray] (B) circle (.375) node[black,anchor=north] {$x_0$};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
draw[gray] (C) circle (.3);
node[blue,anchor=south west] at (D) {$S$};

end{tikzpicture}

end{document}


which looks like



enter image description here



Now, I want to add two dashed lines at each side of S going from the beginning and end of S touching the circles exactly such that each circle stays within.



Something like:



enter image description here










share|improve this question















That is what I have so far:



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
usetikzlibrary{intersections,decorations}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
draw[gray] (A) circle (.3);
draw[gray] (B) circle (.375) node[black,anchor=north] {$x_0$};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
draw[gray] (C) circle (.3);
node[blue,anchor=south west] at (D) {$S$};

end{tikzpicture}

end{document}


which looks like



enter image description here



Now, I want to add two dashed lines at each side of S going from the beginning and end of S touching the circles exactly such that each circle stays within.



Something like:



enter image description here







tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 at 14:53

























asked Nov 27 at 14:33









YoungMath

585




585












  • There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
    – marmot
    Nov 27 at 14:49


















  • There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
    – marmot
    Nov 27 at 14:49
















There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
– marmot
Nov 27 at 14:49




There is a begin{document} missing, graphicblue is not a color defined in your MWE and you might want to reword the question such that it becomes clearer.
– marmot
Nov 27 at 14:49










2 Answers
2






active

oldest

votes

















up vote
3
down vote













UPDATE: Using tangents, see e.g. this nice answer.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
begin{document}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) coordinate(start) .. controls (-.5,-.2) and (.5,0) ..
coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)
coordinate(end);
% see https://tex.stackexchange.com/a/76226/121799
pgfmathsetmacro{rsmall}{0.6}
pgfmathsetmacro{rbig}{0.75}
node [draw=gray,circle,minimum size=rsmall*1cm] (cA) at (A){};
node [draw=gray,circle,minimum size=rbig*1cm] (cB) at (B){};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
node [draw=gray,circle,minimum size=rsmall*1cm] (cC) at (C){};
node[blue,anchor=south west] at (D) {$S$};
begin{scope}[overlay] % see https://tex.stackexchange.com/a/76226/121799
coordinate (cAB) at (barycentric cs:B=-rsmall,A=rbig);
coordinate (cCB) at (barycentric cs:B=-rsmall,C=rbig);
end{scope}
foreach Y in {1,2}
{foreach X in {A,C}
{path (tangent cs:node=cX,point={(cX B)},solution=Y) coordinate(pBX-Y)
(tangent cs:node=cB,point={(cX B)},solution=Y) coordinate(pX B-Y);}
path (tangent cs:node=cA,point={(start)},solution=Y) coordinate(pstartA-Y)
(tangent cs:node=cC,point={(end)},solution=Y) coordinate(pendC-Y); }
draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-2) (pBA-2) (pAB-2) (pCB-1) (pBC-1)
(pendC-1) (end)};
draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-1) (pBA-1) (pAB-1) (pCB-2) (pBC-2)
(pendC-2) (end)};
end{tikzpicture}
end{document}


enter image description here



OLDER ANSWER: You started drawing this with Bezier curves (which I may not necessarily have done), so perhaps the best way is to continue this strategy. Yet I think it helps to make the circles nodes such that you can easily access the points on their peripheries.



documentclass[tikz,border=3.14mm]{standalone}
begin{document}

begin{tikzpicture}[thick,
dot/.style = {
draw,
fill = black,
circle,
inner sep = 0pt,
minimum size = 2pt
}]

draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) ..
coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
node [draw=gray,circle,minimum size=0.6cm] (cA) at (A){};
node [draw=gray,circle,minimum size=0.75cm] (cB) at (B){};
node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
node [draw=gray,circle,minimum size=0.6cm] (cC) at (C){};
node[blue,anchor=south west] at (D) {$S$};
draw[red,dashed] (-1.1,0.5) to[out=-20,in=190] (cA.110)
to[out=10,in=170] (cB.90) to[out=-10,in=170] (cC.80) to[out=-10,in=150] (1.1,-.6);
draw[red,dashed] (-1.1,0.5) to[out=-50,in=150] (cA.250)
to[out=-20,in=180] (cB.270) to[out=00,in=190] (cC.280) to[out=10,in=180] (1.1,-.6);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer






























    up vote
    1
    down vote













    An empirical solution:



    enter image description here



    documentclass[tikz,border=3.14mm]{standalone}
    begin{document}
    begin{tikzpicture}[thin,
    dot/.style = {
    draw,
    fill = black,
    circle,
    inner sep = 0pt,
    minimum size = 2pt
    }]

    draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
    draw[blue] (-1.1,.5)coordinate(s1) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) node[black,below]{$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)coordinate(s2);
    draw (A) node[draw,minimum size=0.52cm,circle] (C1){};
    draw (B) node[draw,minimum size=0.65cm,circle] (C2){};
    draw (C) node[draw,minimum size=0.52cm,circle] (C3){};
    node[blue,anchor=south west] at (D) {$S$};
    node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
    draw[dashed,smooth, tension=0.5] plot coordinates{(s1) (C1.87) (C2.85) (C3.60) (s2)};
    draw[dashed,smooth, tension=0.5] plot coordinates{(s2) (C3.267) (C2.270) (C1.240) (s1)};
    end{tikzpicture}
    end{document}





    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "85"
      };
      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: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462004%2fcircles-touching-path%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote













      UPDATE: Using tangents, see e.g. this nice answer.



      documentclass[tikz,border=3.14mm]{standalone}
      usetikzlibrary{calc}
      begin{document}

      begin{tikzpicture}[thick,
      dot/.style = {
      draw,
      fill = black,
      circle,
      inner sep = 0pt,
      minimum size = 2pt
      }]

      draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
      draw[blue] (-1.1,.5) coordinate(start) .. controls (-.5,-.2) and (.5,0) ..
      coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
      node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)
      coordinate(end);
      % see https://tex.stackexchange.com/a/76226/121799
      pgfmathsetmacro{rsmall}{0.6}
      pgfmathsetmacro{rbig}{0.75}
      node [draw=gray,circle,minimum size=rsmall*1cm] (cA) at (A){};
      node [draw=gray,circle,minimum size=rbig*1cm] (cB) at (B){};
      node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
      node [draw=gray,circle,minimum size=rsmall*1cm] (cC) at (C){};
      node[blue,anchor=south west] at (D) {$S$};
      begin{scope}[overlay] % see https://tex.stackexchange.com/a/76226/121799
      coordinate (cAB) at (barycentric cs:B=-rsmall,A=rbig);
      coordinate (cCB) at (barycentric cs:B=-rsmall,C=rbig);
      end{scope}
      foreach Y in {1,2}
      {foreach X in {A,C}
      {path (tangent cs:node=cX,point={(cX B)},solution=Y) coordinate(pBX-Y)
      (tangent cs:node=cB,point={(cX B)},solution=Y) coordinate(pX B-Y);}
      path (tangent cs:node=cA,point={(start)},solution=Y) coordinate(pstartA-Y)
      (tangent cs:node=cC,point={(end)},solution=Y) coordinate(pendC-Y); }
      draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-2) (pBA-2) (pAB-2) (pCB-1) (pBC-1)
      (pendC-1) (end)};
      draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-1) (pBA-1) (pAB-1) (pCB-2) (pBC-2)
      (pendC-2) (end)};
      end{tikzpicture}
      end{document}


      enter image description here



      OLDER ANSWER: You started drawing this with Bezier curves (which I may not necessarily have done), so perhaps the best way is to continue this strategy. Yet I think it helps to make the circles nodes such that you can easily access the points on their peripheries.



      documentclass[tikz,border=3.14mm]{standalone}
      begin{document}

      begin{tikzpicture}[thick,
      dot/.style = {
      draw,
      fill = black,
      circle,
      inner sep = 0pt,
      minimum size = 2pt
      }]

      draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
      draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) ..
      coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
      node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
      node [draw=gray,circle,minimum size=0.6cm] (cA) at (A){};
      node [draw=gray,circle,minimum size=0.75cm] (cB) at (B){};
      node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
      node [draw=gray,circle,minimum size=0.6cm] (cC) at (C){};
      node[blue,anchor=south west] at (D) {$S$};
      draw[red,dashed] (-1.1,0.5) to[out=-20,in=190] (cA.110)
      to[out=10,in=170] (cB.90) to[out=-10,in=170] (cC.80) to[out=-10,in=150] (1.1,-.6);
      draw[red,dashed] (-1.1,0.5) to[out=-50,in=150] (cA.250)
      to[out=-20,in=180] (cB.270) to[out=00,in=190] (cC.280) to[out=10,in=180] (1.1,-.6);
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer



























        up vote
        3
        down vote













        UPDATE: Using tangents, see e.g. this nice answer.



        documentclass[tikz,border=3.14mm]{standalone}
        usetikzlibrary{calc}
        begin{document}

        begin{tikzpicture}[thick,
        dot/.style = {
        draw,
        fill = black,
        circle,
        inner sep = 0pt,
        minimum size = 2pt
        }]

        draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
        draw[blue] (-1.1,.5) coordinate(start) .. controls (-.5,-.2) and (.5,0) ..
        coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
        node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)
        coordinate(end);
        % see https://tex.stackexchange.com/a/76226/121799
        pgfmathsetmacro{rsmall}{0.6}
        pgfmathsetmacro{rbig}{0.75}
        node [draw=gray,circle,minimum size=rsmall*1cm] (cA) at (A){};
        node [draw=gray,circle,minimum size=rbig*1cm] (cB) at (B){};
        node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
        node [draw=gray,circle,minimum size=rsmall*1cm] (cC) at (C){};
        node[blue,anchor=south west] at (D) {$S$};
        begin{scope}[overlay] % see https://tex.stackexchange.com/a/76226/121799
        coordinate (cAB) at (barycentric cs:B=-rsmall,A=rbig);
        coordinate (cCB) at (barycentric cs:B=-rsmall,C=rbig);
        end{scope}
        foreach Y in {1,2}
        {foreach X in {A,C}
        {path (tangent cs:node=cX,point={(cX B)},solution=Y) coordinate(pBX-Y)
        (tangent cs:node=cB,point={(cX B)},solution=Y) coordinate(pX B-Y);}
        path (tangent cs:node=cA,point={(start)},solution=Y) coordinate(pstartA-Y)
        (tangent cs:node=cC,point={(end)},solution=Y) coordinate(pendC-Y); }
        draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-2) (pBA-2) (pAB-2) (pCB-1) (pBC-1)
        (pendC-1) (end)};
        draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-1) (pBA-1) (pAB-1) (pCB-2) (pBC-2)
        (pendC-2) (end)};
        end{tikzpicture}
        end{document}


        enter image description here



        OLDER ANSWER: You started drawing this with Bezier curves (which I may not necessarily have done), so perhaps the best way is to continue this strategy. Yet I think it helps to make the circles nodes such that you can easily access the points on their peripheries.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}

        begin{tikzpicture}[thick,
        dot/.style = {
        draw,
        fill = black,
        circle,
        inner sep = 0pt,
        minimum size = 2pt
        }]

        draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
        draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) ..
        coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
        node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
        node [draw=gray,circle,minimum size=0.6cm] (cA) at (A){};
        node [draw=gray,circle,minimum size=0.75cm] (cB) at (B){};
        node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
        node [draw=gray,circle,minimum size=0.6cm] (cC) at (C){};
        node[blue,anchor=south west] at (D) {$S$};
        draw[red,dashed] (-1.1,0.5) to[out=-20,in=190] (cA.110)
        to[out=10,in=170] (cB.90) to[out=-10,in=170] (cC.80) to[out=-10,in=150] (1.1,-.6);
        draw[red,dashed] (-1.1,0.5) to[out=-50,in=150] (cA.250)
        to[out=-20,in=180] (cB.270) to[out=00,in=190] (cC.280) to[out=10,in=180] (1.1,-.6);
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer

























          up vote
          3
          down vote










          up vote
          3
          down vote









          UPDATE: Using tangents, see e.g. this nice answer.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{calc}
          begin{document}

          begin{tikzpicture}[thick,
          dot/.style = {
          draw,
          fill = black,
          circle,
          inner sep = 0pt,
          minimum size = 2pt
          }]

          draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
          draw[blue] (-1.1,.5) coordinate(start) .. controls (-.5,-.2) and (.5,0) ..
          coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
          node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)
          coordinate(end);
          % see https://tex.stackexchange.com/a/76226/121799
          pgfmathsetmacro{rsmall}{0.6}
          pgfmathsetmacro{rbig}{0.75}
          node [draw=gray,circle,minimum size=rsmall*1cm] (cA) at (A){};
          node [draw=gray,circle,minimum size=rbig*1cm] (cB) at (B){};
          node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
          node [draw=gray,circle,minimum size=rsmall*1cm] (cC) at (C){};
          node[blue,anchor=south west] at (D) {$S$};
          begin{scope}[overlay] % see https://tex.stackexchange.com/a/76226/121799
          coordinate (cAB) at (barycentric cs:B=-rsmall,A=rbig);
          coordinate (cCB) at (barycentric cs:B=-rsmall,C=rbig);
          end{scope}
          foreach Y in {1,2}
          {foreach X in {A,C}
          {path (tangent cs:node=cX,point={(cX B)},solution=Y) coordinate(pBX-Y)
          (tangent cs:node=cB,point={(cX B)},solution=Y) coordinate(pX B-Y);}
          path (tangent cs:node=cA,point={(start)},solution=Y) coordinate(pstartA-Y)
          (tangent cs:node=cC,point={(end)},solution=Y) coordinate(pendC-Y); }
          draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-2) (pBA-2) (pAB-2) (pCB-1) (pBC-1)
          (pendC-1) (end)};
          draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-1) (pBA-1) (pAB-1) (pCB-2) (pBC-2)
          (pendC-2) (end)};
          end{tikzpicture}
          end{document}


          enter image description here



          OLDER ANSWER: You started drawing this with Bezier curves (which I may not necessarily have done), so perhaps the best way is to continue this strategy. Yet I think it helps to make the circles nodes such that you can easily access the points on their peripheries.



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}

          begin{tikzpicture}[thick,
          dot/.style = {
          draw,
          fill = black,
          circle,
          inner sep = 0pt,
          minimum size = 2pt
          }]

          draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
          draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) ..
          coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
          node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
          node [draw=gray,circle,minimum size=0.6cm] (cA) at (A){};
          node [draw=gray,circle,minimum size=0.75cm] (cB) at (B){};
          node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
          node [draw=gray,circle,minimum size=0.6cm] (cC) at (C){};
          node[blue,anchor=south west] at (D) {$S$};
          draw[red,dashed] (-1.1,0.5) to[out=-20,in=190] (cA.110)
          to[out=10,in=170] (cB.90) to[out=-10,in=170] (cC.80) to[out=-10,in=150] (1.1,-.6);
          draw[red,dashed] (-1.1,0.5) to[out=-50,in=150] (cA.250)
          to[out=-20,in=180] (cB.270) to[out=00,in=190] (cC.280) to[out=10,in=180] (1.1,-.6);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer














          UPDATE: Using tangents, see e.g. this nice answer.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{calc}
          begin{document}

          begin{tikzpicture}[thick,
          dot/.style = {
          draw,
          fill = black,
          circle,
          inner sep = 0pt,
          minimum size = 2pt
          }]

          draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
          draw[blue] (-1.1,.5) coordinate(start) .. controls (-.5,-.2) and (.5,0) ..
          coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
          node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)
          coordinate(end);
          % see https://tex.stackexchange.com/a/76226/121799
          pgfmathsetmacro{rsmall}{0.6}
          pgfmathsetmacro{rbig}{0.75}
          node [draw=gray,circle,minimum size=rsmall*1cm] (cA) at (A){};
          node [draw=gray,circle,minimum size=rbig*1cm] (cB) at (B){};
          node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
          node [draw=gray,circle,minimum size=rsmall*1cm] (cC) at (C){};
          node[blue,anchor=south west] at (D) {$S$};
          begin{scope}[overlay] % see https://tex.stackexchange.com/a/76226/121799
          coordinate (cAB) at (barycentric cs:B=-rsmall,A=rbig);
          coordinate (cCB) at (barycentric cs:B=-rsmall,C=rbig);
          end{scope}
          foreach Y in {1,2}
          {foreach X in {A,C}
          {path (tangent cs:node=cX,point={(cX B)},solution=Y) coordinate(pBX-Y)
          (tangent cs:node=cB,point={(cX B)},solution=Y) coordinate(pX B-Y);}
          path (tangent cs:node=cA,point={(start)},solution=Y) coordinate(pstartA-Y)
          (tangent cs:node=cC,point={(end)},solution=Y) coordinate(pendC-Y); }
          draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-2) (pBA-2) (pAB-2) (pCB-1) (pBC-1)
          (pendC-1) (end)};
          draw[red,dashed] plot[smooth] coordinates {(start) (pstartA-1) (pBA-1) (pAB-1) (pCB-2) (pBC-2)
          (pendC-2) (end)};
          end{tikzpicture}
          end{document}


          enter image description here



          OLDER ANSWER: You started drawing this with Bezier curves (which I may not necessarily have done), so perhaps the best way is to continue this strategy. Yet I think it helps to make the circles nodes such that you can easily access the points on their peripheries.



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}

          begin{tikzpicture}[thick,
          dot/.style = {
          draw,
          fill = black,
          circle,
          inner sep = 0pt,
          minimum size = 2pt
          }]

          draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
          draw[blue] (-1.1,.5) .. controls (-.5,-.2) and (.5,0) ..
          coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B)
          node[black,anchor=north] {$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6);
          node [draw=gray,circle,minimum size=0.6cm] (cA) at (A){};
          node [draw=gray,circle,minimum size=0.75cm] (cB) at (B){};
          node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
          node [draw=gray,circle,minimum size=0.6cm] (cC) at (C){};
          node[blue,anchor=south west] at (D) {$S$};
          draw[red,dashed] (-1.1,0.5) to[out=-20,in=190] (cA.110)
          to[out=10,in=170] (cB.90) to[out=-10,in=170] (cC.80) to[out=-10,in=150] (1.1,-.6);
          draw[red,dashed] (-1.1,0.5) to[out=-50,in=150] (cA.250)
          to[out=-20,in=180] (cB.270) to[out=00,in=190] (cC.280) to[out=10,in=180] (1.1,-.6);
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 27 at 17:09

























          answered Nov 27 at 14:47









          marmot

          79.8k490168




          79.8k490168






















              up vote
              1
              down vote













              An empirical solution:



              enter image description here



              documentclass[tikz,border=3.14mm]{standalone}
              begin{document}
              begin{tikzpicture}[thin,
              dot/.style = {
              draw,
              fill = black,
              circle,
              inner sep = 0pt,
              minimum size = 2pt
              }]

              draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
              draw[blue] (-1.1,.5)coordinate(s1) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) node[black,below]{$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)coordinate(s2);
              draw (A) node[draw,minimum size=0.52cm,circle] (C1){};
              draw (B) node[draw,minimum size=0.65cm,circle] (C2){};
              draw (C) node[draw,minimum size=0.52cm,circle] (C3){};
              node[blue,anchor=south west] at (D) {$S$};
              node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
              draw[dashed,smooth, tension=0.5] plot coordinates{(s1) (C1.87) (C2.85) (C3.60) (s2)};
              draw[dashed,smooth, tension=0.5] plot coordinates{(s2) (C3.267) (C2.270) (C1.240) (s1)};
              end{tikzpicture}
              end{document}





              share|improve this answer

























                up vote
                1
                down vote













                An empirical solution:



                enter image description here



                documentclass[tikz,border=3.14mm]{standalone}
                begin{document}
                begin{tikzpicture}[thin,
                dot/.style = {
                draw,
                fill = black,
                circle,
                inner sep = 0pt,
                minimum size = 2pt
                }]

                draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
                draw[blue] (-1.1,.5)coordinate(s1) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) node[black,below]{$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)coordinate(s2);
                draw (A) node[draw,minimum size=0.52cm,circle] (C1){};
                draw (B) node[draw,minimum size=0.65cm,circle] (C2){};
                draw (C) node[draw,minimum size=0.52cm,circle] (C3){};
                node[blue,anchor=south west] at (D) {$S$};
                node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
                draw[dashed,smooth, tension=0.5] plot coordinates{(s1) (C1.87) (C2.85) (C3.60) (s2)};
                draw[dashed,smooth, tension=0.5] plot coordinates{(s2) (C3.267) (C2.270) (C1.240) (s1)};
                end{tikzpicture}
                end{document}





                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  An empirical solution:



                  enter image description here



                  documentclass[tikz,border=3.14mm]{standalone}
                  begin{document}
                  begin{tikzpicture}[thin,
                  dot/.style = {
                  draw,
                  fill = black,
                  circle,
                  inner sep = 0pt,
                  minimum size = 2pt
                  }]

                  draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
                  draw[blue] (-1.1,.5)coordinate(s1) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) node[black,below]{$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)coordinate(s2);
                  draw (A) node[draw,minimum size=0.52cm,circle] (C1){};
                  draw (B) node[draw,minimum size=0.65cm,circle] (C2){};
                  draw (C) node[draw,minimum size=0.52cm,circle] (C3){};
                  node[blue,anchor=south west] at (D) {$S$};
                  node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
                  draw[dashed,smooth, tension=0.5] plot coordinates{(s1) (C1.87) (C2.85) (C3.60) (s2)};
                  draw[dashed,smooth, tension=0.5] plot coordinates{(s2) (C3.267) (C2.270) (C1.240) (s1)};
                  end{tikzpicture}
                  end{document}





                  share|improve this answer












                  An empirical solution:



                  enter image description here



                  documentclass[tikz,border=3.14mm]{standalone}
                  begin{document}
                  begin{tikzpicture}[thin,
                  dot/.style = {
                  draw,
                  fill = black,
                  circle,
                  inner sep = 0pt,
                  minimum size = 2pt
                  }]

                  draw[smooth cycle, tension=0.6] plot coordinates{(-1,-.4) (1.1,-.6) (.9,.5) (-1.1,.5)} node at (1,.6) {$Omega$};
                  draw[blue] (-1.1,.5)coordinate(s1) .. controls (-.5,-.2) and (.5,0) .. coordinate[dot,pos=0.3,black] (A) coordinate[dot,pos=0.5,black] (B) node[black,below]{$x_0$} coordinate[dot,pos=0.7,black] (C) coordinate[pos=0.92,black] (D) (1.1,-.6)coordinate(s2);
                  draw (A) node[draw,minimum size=0.52cm,circle] (C1){};
                  draw (B) node[draw,minimum size=0.65cm,circle] (C2){};
                  draw (C) node[draw,minimum size=0.52cm,circle] (C3){};
                  node[blue,anchor=south west] at (D) {$S$};
                  node[anchor=south,gray] at ([yshift=10]B) {$gamma(bar{D})$};
                  draw[dashed,smooth, tension=0.5] plot coordinates{(s1) (C1.87) (C2.85) (C3.60) (s2)};
                  draw[dashed,smooth, tension=0.5] plot coordinates{(s2) (C3.267) (C2.270) (C1.240) (s1)};
                  end{tikzpicture}
                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 27 at 18:03









                  nidhin

                  1,927922




                  1,927922






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462004%2fcircles-touching-path%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      AnyDesk - Fatal Program Failure

                      How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

                      QoS: MAC-Priority for clients behind a repeater