After reading this post, I was playing around to make a command to create a TikZ command with two inputs like this:
\documentclass[10pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\centering
\newcommand{\mitsubishi}[2]{
% #1 = radius
% #2 = position x,y
\pgfmathparse{2.966/7}
\pgfmathparse{#1*\pgfmathresult}
\filldraw (#2) circle(#1 cm); % plate
\foreach \angle in {0,120,240}{
\filldraw[white,rotate=\angle] (#2)--++(60:\pgfmathresult)--++(120:\pgfmathresult)--++(-120:\pgfmathresult)--cycle;
}
}
\begin{tikzpicture}
\mitsubishi{2}{0,0}
\end{tikzpicture}
\end{document}
but I have problems with the command \pgfmathresult
inside the \filldraw
command.
Why?
`
to mark your inline code as I did in my edit. Moreover, note that you don't have to sign with your name since it automatically appears in the lower right corner of your post. – Hendrik Vogt Feb 1 '11 at 8:54