%% examples/surface-wedge.tex
%%
%% Demonstrates the wedge shape from tikzphysics.surface.
%% Shows all three `wedge right angle at' variants and access to
%% the physics-meaningful anchors (bl, br, top, slope-mid, centroid).
%%
%% Notes on precedence (v0.1.1):
%%   - If `wedge angle' is set, it is authoritative: height is
%%     derived from width and angle.
%%   - If `wedge angle' is NOT set but `wedge height' is, the
%%     height is authoritative and angle is derived.
%%   - If neither is set, a mode-specific default angle is used
%%     (45 deg for `top', 30 deg for `bl'/`br').

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

\begin{document}

\begin{tikzpicture}
  %% right angle at bottom-right (the default)
  \node[wedge,
        wedge angle=30,
        wedge right angle at=br,
        wedge width=4]
    (W1) at (0,0) {};

  \fill (W1.bl)        circle (1pt) node[below] {\tiny bl};
  \fill (W1.br)        circle (1pt) node[below] {\tiny br};
  \fill (W1.top)       circle (1pt) node[above] {\tiny top};
  \fill (W1.slope-mid) circle (1pt) node[above left=-1pt] {\tiny slope-mid};
  \fill (W1.centroid)  circle (1pt) node[right] {\tiny centroid};

  %% right angle at bottom-left
  \node[wedge,
        wedge angle=45,
        wedge right angle at=bl,
        wedge width=3]
    (W2) at (6,0) {};

  \fill (W2.bl)       circle (1pt) node[below] {\tiny bl};
  \fill (W2.br)       circle (1pt) node[below] {\tiny br};
  \fill (W2.top)      circle (1pt) node[above] {\tiny top};
  \fill (W2.centroid) circle (1pt) node[right] {\tiny centroid};

  %% right angle at top (Thales geometry).
  %% Only width is given, so the default angle of 45 deg kicks in,
  %% producing the isoceles right triangle.
  \node[wedge,
        wedge right angle at=top,
        wedge width=4]
    (W3) at (11,0) {};

  \fill (W3.bl)        circle (1pt) node[below] {\tiny bl};
  \fill (W3.br)        circle (1pt) node[below] {\tiny br};
  \fill (W3.top)       circle (1pt) node[above] {\tiny top (apex)};
  \fill (W3.slope-mid) circle (1pt) node[above left=-1pt] {\tiny slope-mid};
  \fill (W3.slope-right-mid) circle (1pt) node[above right=-1pt] {\tiny slope-right-mid};
\end{tikzpicture}

\end{document}
