While drawing a curve in tikz, the smooth option in draw command makes the output much desired, smooth, and nice to eyes. I want to know how does it do that. To get the same output without the smooth option, one must increase the number of intermediate nodes, resulting in much higher compilation time. For example, the following MWE
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [smooth, samples=10, domain=-1:1] plot (\x,{\x*\x*\x});
\draw [samples=1000, domain=-1:1] plot (\x,{\x*\x*\x-0.1});
\end{tikzpicture}
\end{document}
produces almost same figures. One needs to really zoom in and nitpick to find the difference. I wonder how does smooth complete this job without taking more compilation time.
smoothdoesn't really work well: https://tex.stackexchange.com/questions/371245/how-to-create-a-ricker-wavelet-in-tikz/371248#371248 – Torbjørn T. Feb 09 '21 at 22:37