%% examples/surface-flat-walls.tex
%%
%% Demonstrates the four new flat-strip shapes added in v0.1.3:
%%   physicsground, physicsceiling, physicswall-left, physicswall-right.
%% A block rests on the ground between two side walls with a
%% ceiling above.

\documentclass[tikz, border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{tikzphysics.surface}
\usetikzlibrary{tikzphysics.mechanics}

\begin{document}

\begin{tikzpicture}

  %% ground at (0,0), surface line on top
  \node[physicsground, physics ground width=6, physics ground depth=0.4]
    (G) at (0,0) {};

  %% ceiling 4cm above, narrow strip
  \node[physicsceiling, physics ceiling width=4, physics ceiling depth=0.4]
    (C) at (0,4) {};

  %% left wall: surface faces +x ; its right-mid lies flush
  %% with the ground's top-left
  \node[physicswall-left, physics wall thickness=0.4, physics wall height=4]
    (WL) at (G.top-left) {};

  %% right wall: surface faces -x ; left-mid flush with the
  %% ground's top-right
  \node[physicswall-right, physics wall thickness=0.4, physics wall height=4]
    (WR) at (G.top-right) {};

  %% a block resting on the ground halfway along
  \node[physicsblock, physics block width=1, physics block height=1, anchor=south]
    (B) at (G.top-50) {};

  %% a small label on the block's centre
  \node[font=\tiny] at (B.center) {$m$};

  %% show a force-like arrow from the ceiling down to the block top
  \draw[-latex, thick]
    (C.surface) -- ++(0,-0.4)
    node[right, font=\tiny] {};

\end{tikzpicture}

\end{document}
