[pstricks] multido+rotation
E. Krishnan
ekmath at asianetindia.com
Sun Jan 14 02:20:06 CET 2007
On Sat, 13 Jan 2007, Doris Wagner wrote:
> hi list,
>
> I have the following problem: I want to draw something (always the same
> thing) several times, each time rotated about the same center (which is
> (0,0)) and with the same angle (such that after k repetitions, I arrive
> at 360 degrees)
Here's a (slightly more general) soltion, which rotates an object any
number of times (finally returning to the original position) about any
point (not necessarily the origin)
First make the definition
\def\multirot(#1,#2)#3#4{%
\multido{\i=0+1}{#3}{%
\SpecialCoor
\degrees[#3]
\rput{\i}(#1,#2){%
\rput(-#1,-#2){#4}}}}
Now try something like
\begin{center}
\begin{pspicture}(-2,-2)(4,6)
\multirot(1,2){7}{%
\psframe(1,2)(4,3)}
\end{pspicture}
\end{center}
--
Krishnan
More information about the PSTricks
mailing list