Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am drawing a block hanging from a string, but at some time later, the block is struck by a bullet. I am trying to construct a crude bullet but that seems to be harder than I have anticipated.

Thus how do we draw a bullet?

\documentclass[tikz]{standalone}

%  draws block hanging from a string
\newcommand\block{
  \draw (0, 0) -- (0, -1.5cm) -- (-.5cm, -1.5cm) rectangle (.5cm, -2.5cm);}

\begin{document}
\begin{tikzpicture}
  \coordinate (O) at (0, 0);
  \coordinate (P1) at (0, -1.5cm);

  \block

  \begin{scope}[rotate = 60]
    \coordinate (P2) at (0, -1.5cm);

    \block
    % trying to draw a bullet
    %\draw (0, -2cm) -- ++(0, -.25cm) -- ++(; 
  \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Bullets:

enter image description here

share|improve this question
1  
Is there something wrong with \textbullet? (Perhaps too crude?) –  Sean Allred May 13 at 16:28
    
@SeanAllred I am speaking of something that resembles a bullet fired from a weapon. –  dustin May 13 at 16:29
    
Yes, but there are many shapes that these bullets can take. Rifle bullets, shot, pellets, … the list goes on. Can you upload a sketch of what you're looking for? (Not a physics guy, myself.) –  Sean Allred May 13 at 16:31
1  
@SeanAllred if we used pellets from a shotgun, that would be numerous strikes to the block. I want just one bullet strike. See image for bullets. –  dustin May 13 at 16:34

3 Answers 3

up vote 4 down vote accepted

Quick and crude.

\begin{tikzpicture}[scale=0.3]

\coordinate (A) at (2,3);  % To position the bullet in another fig

\begin{scope}[shift={(A)}, rotate=30]
  \fill[draw=black!80, top color=black!10, bottom color=black!70]
    (0,1) -- (1.5, 1) to [out=0, in=120] (2.5,0.5) 
                      to[out=-120, in=0] (1.5,0) -- (0,0) --cycle;
  \draw[white, draw opacity=0.5] (0,0.1) -- (2.3,0.1);
\end{scope}

\end{tikzpicture}

Bullet

Update: little embellishments.

\begin{tikzpicture}

\coordinate (A) at (2,3);  % To position the bullet in another fig

\begin{scope}[shift={(A)}, rotate=30]
\fill[top color=black!10, bottom color=black!70]
  (0,1) -- (1.5, 1) to [out=0, in=120] (2.5,0.5) to[out=-120, in=0] (1.5,0) -- (0,0) --cycle;
\draw[white, draw opacity=0.5, line cap=round, line width=0.8mm] (0,0.1) -- (1.5,0.1) to[out=0, in=-140] (2.5,0.5)  (0.02,0) -- (0.02,1) (0.2,0) -- (0.2,1);
\draw[black!80, line width=0.4mm]   (0,1) -- (1.5, 1) to [out=0, in=120] (2.5,0.5) to[out=-120, in=0] (1.5,0) -- (0,0) --cycle (0.18,0) -- (0.18,1);
\end{scope}

\end{tikzpicture}

Result

share|improve this answer
    
What is this out in syntax? I have never seen it before. –  dustin May 13 at 16:51
    
It is an easy syntax to draw curved paths. You sepecify the angle at which the path departs from its starting point (out), and the angle at which it arrives at its end (in) –  JLDiaz May 13 at 16:54

I just imported your bullet graphic and cropped it down to bullet1.jpg, and then wrapped your ballistic pendulum in a \stackinset.

\documentclass[tikz]{article}
\usepackage{stackengine}
\usepackage{graphicx}
\usepackage{tikz}
%  draws block hanging from a string
\newcommand\block{
  \draw (0, 0) -- (0, -1.5cm) -- (-.5cm, -1.5cm) rectangle (.5cm, -2.5cm);}

\begin{document}
\stackinset{r}{3.05cm}{b}{.48cm}%
  {\scalebox{.1}{\rotatebox{-90}{\includegraphics{bullet1}}}}{%
\begin{tikzpicture}
  \coordinate (O) at (0, 0);
  \coordinate (P1) at (0, -1.5cm);
%
  \block
%
  \begin{scope}[rotate = 60]
    \coordinate (P2) at (0, -1.5cm);
%
    \block
    % trying to draw a bullet
    %\draw (0, -2cm) -- ++(0, -.25cm) -- ++(; 
  \end{scope}
\end{tikzpicture}
}
\end{document}

enter image description here

By defining the bullet placement relative to the right horizontal edge, it will mean than any bullet graphic imported should give the same bullet-tip placement, even if the graphic is of different size/shape. For example, here it is with bullet2.jpg, with the \stackinset parameters the same.

enter image description here

Also, \stackinsets can be nested, if you want your bullet, or a deformed variant of it, to appear in the target block:

\documentclass[tikz]{article}
\usepackage{stackengine}
\usepackage{graphicx}
\usepackage{tikz}
%  draws block hanging from a string
\newcommand\block{
  \draw (0, 0) -- (0, -1.5cm) -- (-.5cm, -1.5cm) rectangle (.5cm, -2.5cm);}

\begin{document}
\stackinset{r}{.65cm}{b}{1.35cm}%
  {\scalebox{.04}{\rotatebox{-30}{\includegraphics{bullet3b}}}}{%
\stackinset{r}{3.05cm}{b}{.48cm}%
  {\scalebox{.04}{\rotatebox{-90}{\includegraphics{bullet3a}}}}{%
\begin{tikzpicture}
  \coordinate (O) at (0, 0);
  \coordinate (P1) at (0, -1.5cm);
%
  \block
%
  \begin{scope}[rotate = 60]
    \coordinate (P2) at (0, -1.5cm);
%
    \block
    % trying to draw a bullet
    %\draw (0, -2cm) -- ++(0, -.25cm) -- ++(; 
  \end{scope}
\end{tikzpicture}
}}
\end{document}

enter image description here

share|improve this answer

A parameterized head of a bullet with PSTricks.

\documentclass[pstricks]{standalone}
\usepackage{pst-plot}

\def\bottom#1{\psparametricplot{0}{2}{-#1*t^2+14|t}\psline(1,2)}

\begin{document}
\multido{\r=1.1+.1}{10}{%
\begin{pspicture}[algebraic](0,-3)(15,3)
    \pscustom[fillstyle=solid,fillcolor=gray,linewidth=2pt]
    {
        \bottom{\r}
        \reversepath
        \scale{1 -1}
        \bottom{\r}
        \closepath
    }
\end{pspicture}}

\end{document}

enter image description here

share|improve this answer
1  
the bullet has the hiccup! –  jfbu May 13 at 17:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.