3

I wish to draw a deformed hexagon, defined by polar coordinates. I wish define a distance \aI and express the second polar coordinates using with this variable, but I get complying error.

! Package PGF Math Error: Unknown operator $' or$(' (in '($ (0.482962913').

My MnWE (Minimal not-Working Example):

\documentclass{memoir}

\usepackage{xcolor}
\usepackage{tikz}
  \usetikzlibrary{shapes.geometric,positioning,calc}

\usepackage{calc}

\begin{document}
\begin{center}

\newdimen\aI
\aI=1cm

\begin{tikzpicture}[rotate=0]


  \begin{scope}[yshift=0cm]
        \draw[yshift=0cm] (37.5:($ (0.482962913)*(\aI) $)) --
        (90:($ (1.276316253*\aI) $ )) -- (142.5:($ (0.482962913*\aI) $ )) -- (232.5:($ (0.482962913*\aI) $ )) -- (270:($ (1.276316253*\aI) $ )) -- (307.5:($ (0.482962913*\aI) $ )) -- cycle ;
  \end{scope}


\end{tikzpicture}

\end{center}
\end{document}

Helps will be welcomed.

1 Answer 1

4

You don't need these $ signs or the extra () either.

\begin{tikzpicture}[rotate=0]
\begin{scope}[yshift=0cm]
\draw[yshift=0cm] (37.5:0.482962913\aI) --
    (90:1.276316253\aI)    -- (142.5:0.482962913\aI) --
    (232.5:0.482962913\aI) -- (270:1.276316253\aI) -- 
    (307.5:0.482962913\aI) -- cycle ;
\end{scope}
\end{tikzpicture}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .