# How to convert polar coordinates to cartesian coordinates

I am new to tikz. I am using the following code (Polar co-ordinates)

\def\radius{12cm}

\begin{tikzpicture}

\foreach \x in {0,10,...,350}
{

};

\foreach \x in {0,10,...,350}

{

};

\end{tikzpicture}


The code works.

But when I use the code (converting to Cartesian co-ordinates)

\foreach \x in {0,10,...,350}
{

};


error is generated. My search resulted in

TikZ does not use square coordinates but polar one, how to change it in order to use Cartesian coordinates?

But I am unable to do that. How it can be done? Thanks in advance.

You need to protect the math operation with braces. Then your code works as is (after removing the backslash before *)
\def\radius{12cm}