3
\documentclass{article}
\usepackage{tikz}
\begin{document}    
\usetikzlibrary{decorations.pathmorphing}
\begin{tikzpicture}
\draw[black] (-1,-2) -- (-1,0);
\draw[decorate, decoration = {snake, segment length = .5cm}] (-1.5,-2) -- (-0.5,-2);
\end{tikzpicture}
\end{document}

enter image description here

I would like to indicate that my drawing has been cutoff at a certain point by wavy lines. I don't know the exact term for that style and thus came up with the example above. Is there a more elegant way to do this? Maybe a package, custom arrow tip? Or do I just need to experiment with the pathmorphing?

Ideally the wavy line would be the top part of a white filled box with all other edges also white, so I can just move it over my original drawing. Inspired by this answer:

\documentclass{article}
\usepackage{tikz}
\begin{document}    
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{shapes}
\begin{tikzpicture}
\draw[black] (0,-2) -- (0,0);

\node[tape, draw, tape bend height=4mm, tape bend top=out and in,  tape bend bottom=none,fill=white,minimum width=4cm,minimum height=2cm] at (0,-2) {};


\end{tikzpicture}
\end{document}

enter image description here

end result should look something like this:

enter image description here

  • 1
    If I got you right, you can use just the clip option; clip along the wavy line and then use the last x-coordinate and go straigt up. Then just cycle the rectangle and you get the desired output. Especially for the last picture you can use just the intersections library and make an intersection with the wavy line and draw from the intersection with relative coordinates just straight up. – current_user Nov 21 '18 at 11:54
1

Given @current_user input I was able to create the following:

\documentclass{article}
\usepackage{tikz}
\begin{document} 
\begin{tikzpicture}
\draw (0,0) circle (1);
\draw (-1,-3) -- (6,-3) -- (2.5,8) -- cycle;
\draw[black] (-1,-2) -- (-1,14);
\end{tikzpicture}
\end{document}

enter image description here

\documentclass{article}
\usepackage{tikz}
\begin{document} 
\begin{tikzpicture}
\pgfmathsetmacro{\startx}{-2}
\pgfmathsetmacro{\endx}{6}
\pgfmathsetmacro{\starty}{0}
\pgfmathsetmacro{\endy}{14}


\begin{scope}
\clip  foreach \x in {\startx,2,...,\endx} { (\x,\starty) to [bend left=25]  (\x+2,\starty) to [bend right=25]  (\x+4,\starty)}  -- (\endx+4,\endy) -- (\startx,\endy) -- (\startx,\starty);
\draw (0,0) circle (1);
\draw (-1,-3) -- (6,-3) -- (2.5,8) -- cycle;
\draw[black] (-1,-2) -- (-1,14);
\end{scope}
\draw  foreach \x in {\startx,2,...,\endx} { (\x,\starty) to [bend left=25]  (\x+2,\starty) to [bend right=25]  (\x+4,\starty)} ;
\end{tikzpicture}
\end{document}

enter image description here

Defining in the clipping area the region I want to keep vs. the region to omit seemed a bit counter intuitive to me, but it works now.

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.