%% examples/surface-numeric-anchors.tex
%%
%% Demonstrates the numeric edge anchors (added in v0.1.3).
%% Every tikzphysics shape exposes <edge>-0..100 anchors along each
%% edge.  The edges are parameterised CCW from the bottom-left.

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

\begin{document}

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

  %% ------- platform with numeric anchors on all four edges -------
  \node[physicsplatform-left,
        physics platform width=5,
        physics platform depth=1]
    (PL) at (0,0) {};

  %% dot every 25% on all four bounding-box edges
  \foreach \t in {0, 25, 50, 75, 100} {
    \fill[red]    (PL.floor-bottom-\t) circle (1.2pt)
      node[below=1pt, font=\tiny\ttfamily] {b\t};
    \fill[blue]   (PL.floor-right-\t)  circle (1.2pt)
      node[right=1pt, font=\tiny\ttfamily] {r\t};
    \fill[green!60!black] (PL.floor-top-\t) circle (1.2pt)
      node[above=1pt, font=\tiny\ttfamily] {t\t};
    \fill[orange] (PL.floor-left-\t) circle (1.2pt)
      node[left=1pt,  font=\tiny\ttfamily] {l\t};
  }

  %% ------- wedge with base/right/slope numeric anchors -------
  \node[physicswedge,
        physics wedge width=4,
        physics wedge height=2.5]
    (W) at (0,-5) {};

  \foreach \t in {0, 25, 50, 75, 100} {
    \fill[red]    (W.base-\t)  circle (1.2pt)
      node[below=1pt, font=\tiny\ttfamily] {b\t};
    \fill[blue]   (W.right-\t) circle (1.2pt)
      node[right=1pt, font=\tiny\ttfamily] {r\t};
    \fill[green!60!black] (W.slope-\t) circle (1.2pt)
      node[above=1pt, font=\tiny\ttfamily] {s\t};
  }

\end{tikzpicture}

\end{document}
