%% examples/surface-flat-walls.tex %% %% Demonstrates the four new flat-strip shapes added in v0.1.3: %% ground, ceiling, wall-left, wall-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[ground, ground width=6, ground depth=0.4] (G) at (0,0) {}; %% ceiling 4cm above, narrow strip \node[ceiling, ceiling width=4, ceiling depth=0.4] (C) at (0,4) {}; %% left wall: surface faces +x ; its midpoint lies flush %% with the ground's top-left \node[wall-left, wall thickness=0.4, wall height=4] (WL) at (G.top-left) {}; %% right wall: surface faces -x ; its midpoint lies flush with the %% ground's top-right \node[wall-right, wall thickness=0.4, wall height=4] (WR) at (G.top-right) {}; %% a block resting on the ground halfway along \node[block, block width=1, block height=1, anchor=south] (B) at (G.surface-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} .