I am trying to create a nice version of the diagram below using the tikz package. I am having trouble positioning the nodes in the correct places. How would I go about creating this?

Bouncing Ball to Illustrate Special Relativity

  • welcome-- would you like to share your code
    – js bibra
    Mar 12, 2021 at 0:45
  • This is un-physical. Whom are you going to show this?
    – AlexG
    Mar 12, 2021 at 7:54

1 Answer 1


For future questions please provide a MWE and read about tikz. You can use the piece of code below to get started.



    \begin{tikzpicture}[inner sep=5pt]  
        \node[circle, draw=black] (A) at (0,0) {};
        \node[circle, draw=none] (B) at (3,0) {};
        \node[circle, draw=none] (C) at (0,-3) {};
        \draw [->,dashed] (A) -- node[above] {\tiny Movement of train} (B);
        \draw [->,dashed] (A) -- node[above, rotate=90] {\tiny Movement of ball} (C);
        \draw[red,thick] (A) -- (2,-2) node[below right] {\tiny Observed effective Movement of ball (D2)} -- (4,0);

enter image description here

  • Thank you! I am just getting started with tikz.
    – Will Assad
    Mar 12, 2021 at 2:27

You must log in to answer this question.

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