In tikz: drawing a parametrised curve I asked about drawing a curve using the \pgfplotfunction command.
I could make my code better if I could use the \foreach cycle:
\documentclass{minimal}
\usepackage{tikz}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[x=2cm/2]
\newcommand\rad{1}
\pgfplothandlerlineto
\foreach \phiparam in {0, 1, ..., 360}
{
\pgfpointxy{\rad *cos(\phiparam)}{\rad *sin(\phiparam)}
\pgfusepath{stroke}
}
\end{tikzpicture}
\end{document}
How to use the \foreach cycle to calculate parameters, plot points and connect them to show a smooth curve?

\pgfusepathcan be executed once at the end and path can be added withlinetos. – percusse Nov 04 '17 at 15:34\pgfpathmovetoin the beginning. – Viesturs Nov 04 '17 at 16:11