0

I am trying to make the following boxing bag scheme:

enter image description here

I do not know how to code the shape of the bag and how to plot the supporting chain and the wall structure. I have found this entry How can I draw an egg using TikZ? but it is not the same shape of the boxing bag.

2 Answers 2

1

This could be a starting point. All is made with lines, circles and arcs, but the key here are the scopes to draw each part of the picture. And, in some cases the canvas provided by the 3d library.

\documentclass[border=2mm]{standalone}
\usepackage    {tikz}
\usepackage    {siunitx} % SI units, \SI and \ang commands
\usetikzlibrary{3d}      % For "canvas is..." options
\usetikzlibrary{babel}   % There are issues with some babel packages
\usetikzlibrary{calc}    % Computing some coordinates (adding them, in this example)

% isometric axes
\pgfmathsetmacro\xx{1/sqrt(2)}
\pgfmathsetmacro\xy{1/sqrt(6)}
\pgfmathsetmacro\zy{sqrt(2/3)}

\begin{document}
\begin{tikzpicture}[x={(\xx cm,-\xy cm)},y={(\xx cm,\xy cm)},z={(0 cm,\zy cm)},%
                    thick,line cap=round,line join=round]
% some dimensions
\def\br{1.5}  % bag radius
\def\be{4}    % bag elevation
\def\we{17.6} % wall structure elevation
\def\ws{4}    % wall structure separation
% Wall & floor
\fill[canvas is yz plane at x=-\ws,gray!20] (-1.2*\ws,0)    rectangle (1.2*\ws,\we+1);
\fill[canvas is xy plane at z=0   ,gray!10] (-\ws,-1.2*\ws) rectangle (6,1.2*\ws);
\draw[dashed] (0,0,\be) -- (0,0,0) -- (\ws,0,0)  node[midway,sloped, below] {\SI{40}{cm}};
\fill[canvas is xy plane at z=0,gray] (\ws,0) circle (0.25) node[black,xshift=1.25cm] {Boxing Spot};
% Bag
\draw[fill=white] ($(-135:\br)+(0,0,\be+9.6)$) --++ (0,0,-9.6)
    {[canvas is xy plane at z=\be] arc (-135:45:\br)} -- ($(45:\br)+(0,0,\be+9.6)$);
\draw[canvas is xy plane at z=\be+9.6,fill=white] (0,0) circle (\br);
\foreach[count=\xi]\i in{1.5,4.2,6.9} 
{%                       1.5, 1.5+2.7, 1.5+2.7+2.7
  \begin{scope}[canvas is xy plane at z=\be+\i]
    \draw[orange] (0,0) circle (\br);
    \fill[orange] (0,0,\be+\i) circle (1pt);
    \coordinate   (C\xi) at (225:\br+0.2);
  \end{scope}
}
\foreach\i in {0,90,180,270}
{%
  \draw[line width=0.5mm] ($(\i:\br)+(0,0,\be+9.6)$) -- (0,0,\we-0.15);
}
\draw[line width=0.5mm] (0,-\br,\be+9.6) --++ (0,0,-0.5);
\draw[line width=0.5mm] (\br, 0,\be+9.6) --++ (0,0,-0.5);
% Wall structure
\begin{scope}[shift={(-\ws,0,\we)},line width=1.5mm]
  \draw (0.5*\ws ,0,0) -- (0,0,-0.5*\ws) -- (0,0,-\ws);
  \draw (0,-0.5*\ws,0) -- (0,0.5*\ws,0);
  \draw (0,0,0)        -- (1.25*\ws,0,0);
  \draw[canvas is xz plane at y=0,line width=0.75mm] (\ws,-0.15) circle (0.15);
\end{scope}
% Bag dimensions
\begin{scope}[rotate around z=45,canvas is xz plane at y=0]
  \draw[blue,<->] (2*\br,\be) --++ (0,1.5) node [midway,right] {\SI{15}{cm}};
  \foreach\i in {0,1,2}
  {%
    \draw[blue,dashed] (  \br,\be+1.5+2.7*\i) --++ (\br,0);
    \draw[blue,<->]    (2*\br,\be+1.5+2.7*\i) --++ (0,2.7) node [midway,right] {\SI{27}{cm}};
  }
  \draw[blue,dashed] (\br,\be)     --++ (\br,0);
  \draw[blue,dashed] (\br,\be+9.6) --++ (\br,0);
  \draw[blue] (3*\br,\be+6.9) --++ (0.5,0) --++ (0,-2.7) node [midway,right] {Punch Section} --++ (-0.5,0);
\end{scope}
% section
\begin{scope}[x={(1cm,0cm)},y={(0cm,1cm)},shift={(-8,6)},very thick]
  \foreach\i in {1,2,3}
  {%
    \draw[blue,-latex] (0,0) -- (C\i);
  }
  \draw[fill=white] (0,0) circle (3);
  \draw[blue,<->] (-60:0.5) arc (-60:60:0.5) node [midway,right] {\ang{120}};
  \foreach\i in {60,180,300}
  {%
    \begin{scope}[rotate=\i]
      \draw[gray,dashed] (0,0) -- (3,0);
      \fill[yellow,opacity=0.8] (1.5,-0.25) rectangle (2.5,0.25);
    \end{scope}
  }
  \draw[blue,latex-] (0,-2) -- (0,-4) node [below] {Neoprene lid (open)};
  \draw[blue,latex-] (60:2) -- (0, 4) node [above] {ABS acelerometer};
  \draw[blue,<->]    (180:2.5) -- (180:3);
  \node[blue] at     (-3,0) [xshift=-0.25cm,rotate=90,anchor=center] {\SI{4}{cm} to disk edge};
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

2
  • Thank you. The solution is awesome. The isometric part is difficult for me to understand. How it works x={(\xx cm,-\xy cm)},y={(\xx cm,\xy cm)},z={(0 cm,\zy cm)} in the beginning of the tikzpicture and why the values \xx \xy \zy are chosen.
    – pablo
    May 24, 2021 at 12:15
  • @pablo, these are unitary vectors in the direction of the axes. Their values are calculated in the preamble and you coule define any others the same way (but the tangents of the cylinder in this drawing need isometric axes). In this other post I have a little explanation: tex.stackexchange.com/questions/593344/… May 24, 2021 at 12:27
1

If you just want something more relaxed, here's a starting point too, since you wanted explicitely a shape that was not a cylinder.

Boxing bag

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.shapes}
\begin{document}
    \begin{tikzpicture}
        %\draw[help lines] (-1,0) grid (5,12);
        \draw [gray,line width=1pt] plot [smooth cycle] coordinates {(0,0) (.5,8) (3.5,8) (4,0)};
        \draw[brown,line width=1pt]
            (2,6) ellipse (1.9 and 0.5)
            (2,4) ellipse (2.1 and 0.5)
            (2,2) ellipse (2.2 and 0.5);
        \draw[thick,gray,decorate,decoration={shape backgrounds,shape=circle,shape size=4pt,shape sep=3pt}] (2,10) -- (1.5,8.8) (2,10) -- (2.5,8.8) (2,10) --++ (0,1);
        \draw[gray,line width=7pt,cap=round]
            (2.5,11.3) -- (-1,10.2)
            (-2,10.3) -- (0,10)
            (1,10.8) -- (0,8.5) --++ (0,-.5);
    \end{tikzpicture}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .