3

I would like to hide the b-i edge when it passes all between the edges f-l and h-c ( not only at the intersection). I would need a solution that doesn't force me to compute manually the slope at (f) and (h).

Idealy I would like to be able to "turn off" any drawing of a curve between two points of the given curve.

\documentclass{standalone}
\usepackage{tikz,pgf}
\usetikzlibrary{intersections}


\begin{document}
\begin{tikzpicture} [every node/.style={draw,circle}]

\node (b) at (0,5){b};
\node (c) at (8,5){c};


\node (f) at (0,2){f};
\node (h) at (1,0){h};
\node (i) at (7,0){i};
\node (l) at (6,5){l};





\draw (f) edge [name path=pf, line width=2pt, in=-90, out=0] (l);
\draw (b) edge [ name path=pb, line width=2pt, in=180, out=-90] (i);
\draw (h) edge [name path=ph, line width=2pt, in=-90, out=0]  (c);

\node [name intersections={of=pb and ph, by={e}}, fill=white] at (e) {e};
\node [name intersections={of=pb and pf, by={d}}, fill=white] at (d) {d};



\end{tikzpicture}

\end{document}

I want to erase the curve between (d) and (e)

  • Do you want to remove the portion of b-i between nodes d and e? – ferahfeza Jun 24 at 12:28
  • Yes exactly (preferably by keeping the edge b-i, and "turning it off" somehow). – Victor Flux Radkow Jun 24 at 12:51
  • I edited my previous answer. – ferahfeza Jun 24 at 13:02
2

I found a dirty solution that drawing an ellipse between nodes d and e and redraw them.

\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections,shapes,fit,calc}

\begin{document}
\begin{tikzpicture} [every node/.style={draw,circle}]

\node (b) at (0,5){b};
\node (c) at (8,5){c};
\node (f) at (0,2){f};
\node (h) at (1,0){h};
\node (i) at (7,0){i};
\node (l) at (6,5){l};

\draw (f) edge [name path=pf, line width=2pt, in=-90, out=0] (l);
\draw (b) edge [name path=pb, line width=2pt, in=180, out=-90] (i);
\draw (h) edge [name path=ph, line width=2pt, in=-90, out=0]  (c);

\node [name path=circe,name intersections={of=pb and ph, by={e}},fill=white] at (e) {e};
\node [name path=circd,name intersections={of=pb and pf, by={d}},fill=white] at (d) {d};
\path [name intersections={of=circd and pb, by={d1,d2}}];
\path [name intersections={of=circe and pb, by={ee}}];

\path let
         \p1 = ($(d2.north east)-(ee.south west)$),
         \n1 = {veclen(\p1)}
         in
         (d2.south) -- (ee.north) 
         node[white,midway, sloped, draw, ellipse,fill=white, 
              minimum width=\n1, minimum height=\n1/4] {};

\node [name path=circe,name intersections={of=pb and ph, by={e}}] at (e) {e};
\node [name path=circd,name intersections={of=pb and pf, by={d}}] at (d) {d};

\end{tikzpicture}

\end{document}

enter image description here

  • A little bit too circumstential. Idealy I would like to turn off any curve between two given points of the curve – Victor Flux Radkow Jun 24 at 13:41

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.