Wednesday, October 31, 2012

Deal with repetitive work in pstricks efficiently (1) --- multirput

Computer makes the repetitive work simple. And in pstricks command "\multirput" and "\multido" is designed to deal with the repetitive work.
This time we will talk about command "\multirput", and in the next post "\multido" will also be talked.

"\multirput" as its literal meaning, archive the utility of multi "\rput" commands. The complete form of this command is "\multirput [refpoint] {rotation} (x0,y0) (dx,dy) {nums} {stuff}". The argument "refpoint", "rotation" and "stuff" have the same meaning as the corresponding arguments in command "\rput". (x0,y0) is the starting rput position and (dx,dy) is the increasement, and "nums" is the repetation times. In the following example we use this command to create a simple geometry pattern.

    %horizontal loop
      %vertical loop
        %Draw a equilateral triangle
    \psline(2.5,4.33)(7.5,4.33) %top line
    \psline(7.5,4.33)(5,0) %right line

Fig.1 Deal with repetitive work in efficiently (1) --- multirput

Files Download: tex ps pdf

No comments:

Post a Comment

Creative Commons License
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.