%% examples/percentage-anchors-beginner.tex
%% Beginner guide: percentage anchors on a wedge and an optical surface.

\documentclass[tikz,border=6mm]{standalone}
\usepackage{tikzphysics}

\begin{document}
\begin{tikzpicture}[font=\small]
  %% A node needs a name before its anchors can be referenced.
  \node[wedge, wedge width=6cm, wedge angle=30] (W) at (0,0) {};

  %% slope-0 is the top; slope-100 is the lower-left foot.
  \foreach \t in {0,25,50,75,100}{
    \fill[blue!70!black] (W.slope-\t) circle (1.7pt);
    \node[fill=white,inner sep=1pt]
      at ($(W.slope-\t)+(0,0.38)$) {\texttt{slope-\t}};
  }
  \draw[->,blue!70!black,thick]
    ($(W.slope-0)+(0,1.15)$) --
    node[above,sloped,fill=white,inner sep=1pt]{0 to 100}
    ($(W.slope-100)+(0,1.15)$);

  %% The short .T form is available on ramps and optical shapes.
  \begin{scope}[xshift=9cm]
    \node[convex-lens, convex lens radius=3cm,
          convex lens thickness=0.2cm,
          convex lens aperture angle=25] (L) at (0,0) {};
    \foreach \t in {0,20,50,80,100}{
      \fill[red!75!black] (L.\t) circle (1.7pt);
      \node[right=4pt,fill=white,inner sep=1pt]
        at (L.\t) {\texttt{L.\t}};
    }
    \node[align=center,below=8pt] at (L.bottom)
      {\texttt{L.T} is shorthand\\for \texttt{L.front-T}};
  \end{scope}
\end{tikzpicture}
\end{document}
