\section{Command Reference}
\label{sec:command-reference}

This section collects the public commands and their keys in reference form.
Examples remain brief here; the larger workflow discussion is in the earlier
sections.

\subsection{\texttt{\textbackslash luatikztdtoolsset}}

Convenience wrapper for setting keys in the family
\verb|/lua-tikz3dtools/.cd|. Use it when document-wide or figure-wide defaults are
worth centralizing.

\subsection{\texttt{\textbackslash setobject}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{name} & nonempty string & Name stored in the sandbox object table. \\
\texttt{object} & Lua chunk & Evaluated object to store under \texttt{name}. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendlabel}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{v} & point expression & Three-dimensional label position. \\
\texttt{text} & TeX material & Node body emitted after the geometry. \\
\texttt{transformation} & matrix expression & Optional transform; default is identity. \\
\texttt{filter} & Lua block & Predicate on the projected point \texttt{A}; default returns true. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendlight}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{v} & vector expression & Directional light vector. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendtriangle}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{m} & matrix expression & Whole $3 \times 4$ triangle matrix, with one homogeneous vertex per row. \\
\texttt{transformation} & matrix expression & Optional transform; default is identity. \\
\texttt{fill options} & TikZ option list & Styling for the emitted triangle path. \\
\texttt{filter} & Lua block & Predicate on the triangle vertices \texttt{A}, \texttt{B}, \texttt{C}. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendcurve}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{uparams} & parameter triple & Start, stop, and sample count for \texttt{u}. \\
\texttt{ustart}, \texttt{ustop}, \texttt{usamples} & legacy scalars & Older equivalent form for the \texttt{u} direction. \\
\texttt{v} & function body in \texttt{u} & Returns a point for each sample. \\
\texttt{transformation} & matrix expression & Optional transform; default is identity. \\
\texttt{draw options} & TikZ option list & Styling for emitted segments. \\
\texttt{arrow tip} & TikZ option list & Style for geometric arrowhead at the end. \\
\texttt{arrow tail} & TikZ option list & Style for geometric arrowhead at the start. \\
\texttt{filter} & Lua block & Predicate on segment endpoints \texttt{A}, \texttt{B}. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendsurface}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{uparams}, \texttt{vparams} & parameter triples & Start, stop, and sample counts for the two parameters. \\
\texttt{ustart}, \texttt{ustop}, \texttt{usamples} & legacy scalars & Older equivalent form for \texttt{u}. \\
\texttt{vstart}, \texttt{vstop}, \texttt{vsamples} & legacy scalars & Older equivalent form for \texttt{v}. \\
\texttt{v} & function body in \texttt{u,v} & Returns the sampled point on the surface. \\
\texttt{transformation} & matrix expression & Optional transform; default is identity. \\
\texttt{fill options} & TikZ option list & Styling for emitted triangles. \\
\texttt{filter} & Lua block & Predicate on triangle vertices \texttt{A}, \texttt{B}, \texttt{C}. \\
\texttt{curve} & Lua chunk & Returns a table of parameter-space line segments to embed on the surface. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash appendsolid}}

\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}p{0.22\linewidth} >{\raggedright\arraybackslash}p{0.20\linewidth} X}
\toprule
Key & Expected value & Meaning \\
\midrule
\texttt{uparams}, \texttt{vparams}, \texttt{wparams} & parameter triples & Parameter ranges and sample counts for the three directions. \\
\texttt{ustart}, \texttt{ustop}, \texttt{usamples} & legacy scalars & Older equivalent form for \texttt{u}. \\
\texttt{vstart}, \texttt{vstop}, \texttt{vsamples} & legacy scalars & Older equivalent form for \texttt{v}. \\
\texttt{wstart}, \texttt{wstop}, \texttt{wsamples} & legacy scalars & Older equivalent form for \texttt{w}. \\
\texttt{v} & function body in \texttt{u,v,w} & Returns the sampled point in space. \\
\texttt{transformation} & matrix expression & Optional transform; default is identity. \\
\texttt{fill options} & TikZ option list & Styling for emitted boundary triangles. \\
\texttt{filter} & Lua block & Predicate on triangle vertices \texttt{A}, \texttt{B}, \texttt{C}. \\
\bottomrule
\end{tabularx}

\subsection{\texttt{\textbackslash displaysimplices}}

This command takes no keys. It partitions geometry if needed, applies filters,
sorts by occlusion, emits TikZ paths, emits labels, and clears the accumulated
scene and light list.

\subsection{Defaults and common expectations}

Unless a command says otherwise, the default transformation is the identity and
the default filter accepts everything. Sample counts on parametric commands must
be at least $2$. The renderer silently ignores degenerate simplices and rejects
non-finite projected values.

The current style file does not export \verb|\appendpoint|. Authors who need a
marker-like point should use one of the strategies discussed in
Section~\ref{sec:basic-primitives}.