%% surface-bent-platform.tex
%% Exercise `physics wall angle' on physicsplatform-left / -right / -both.
%% Each row shows the same platform drawn at a range of wall angles,
%% with anchors overlaid.

\documentclass[border=4pt,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{tikzphysics}

\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=0pt}]

  %% ------------- physicsplatform-left : wall angle sweep -------------
  \node[anchor=east,font=\small\ttfamily] at (-0.4,7) {platform-left};
  \foreach \a [count=\i from 0] in {-90,-60,-30,30,60,90,135} {%
    \node[physicsplatform-left,
          physics platform width=2.2cm, physics platform depth=2cm,
          physics wall angle=\a,
          anchor=floor-tl]
      (P-\i) at (3*\i, 7) {};
    \node[font=\tiny,below=2pt] at (P-\i.floor-bottom-mid) {$\a^\circ$};
  }

  %% ------------- physicsplatform-right : wall angle sweep -------------
  \node[anchor=east,font=\small\ttfamily] at (-0.4,2.5) {platform-right};
  \foreach \a [count=\i from 0] in {-90,-60,-30,0,30,60,90} {%
    \node[physicsplatform-right,
          physics platform width=2.2cm, physics platform depth=2cm,
          physics wall angle=\a,
          anchor=floor-tr]
      (R-\i) at (3*\i+2.2, 2.5) {};
    \node[font=\tiny,below=2pt] at (R-\i.floor-bottom-mid) {$\a^\circ$};
  }

  %% ------------- physicsplatform-both : dual-wall asymmetric ---------
  \node[anchor=east,font=\small\ttfamily] at (-0.4,-2) {platform-both};
  \foreach \la/\ra [count=\i from 0] in
      {-90/-90, -60/-60, -45/45, 180/0, 30/-30, 60/60, 45/-45} {%
    \node[physicsplatform-both,
          physics platform width=2.2cm, physics platform depth=2cm,
          physics left wall angle=\la, physics right wall angle=\ra,
          anchor=floor-top-mid]
      (B-\i) at (3*\i+1.1, -2) {};
    \node[font=\tiny,below=2pt]
      at (B-\i.floor-bottom-mid) {$\la^\circ,\ra^\circ$};
  }

  %% ------------- anchor demo on one bent platform ---------------
  %% Show off numeric edge anchors (wall-outer-T, floor-top-T)
  %% on a single physicsplatform-left at wall angle = +45.
  \begin{scope}[yshift=-6cm]
    \node[physicsplatform-left,
          physics platform width=5cm, physics platform depth=2.5cm,
          physics wall angle=45,
          anchor=corner] (P) at (0,0) {};

    %% dots at the platform corner, wall corners, and floor corners
    \foreach \n/\lbl in
        {corner/K, wall-A/A, wall-B/B, wall-C/C, wall-D/D,
         floor-tl/FTL, floor-tr/FTR, floor-br/FBR, floor-bl/FBL} {
      \fill[red] (P.\n) circle (1.2pt);
      \node[red,font=\scriptsize,above right=0pt] at (P.\n) {\lbl};
    }
    %% numeric anchors along wall-outer and floor-top
    \foreach \t in {0,25,50,75,100} {
      \fill[blue!70!black] (P.wall-outer-\t) circle (0.8pt);
      \fill[teal]          (P.floor-top-\t) circle (0.8pt);
    }
  \end{scope}

\end{tikzpicture}
\end{document}
