12.07.2015 Views

graphics with PSTric..

graphics with PSTric..

graphics with PSTric..

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Placing Things6.1. Placing and rotating <strong>PSTric</strong>ks objectsSuppose we want to draw a picture like the one given below using<strong>PSTric</strong>ks:Placing and rotating <strong>PSTric</strong>ks objectsPlacing and rotating T E X objectsPutting labelsCD3 cmA60 ◦ 5 cmTaking A as (0, 0), we can easily specify B as (5, 0) and C as (3; 60). (Remember\SpecialCoor of the last chapter?). Again, by shifting the originto B, by setting origin={-5,0}, we can specify D as (3; 60). And then AB,AC and BD can be drawn <strong>with</strong> \psline. But how do we draw CD? Recallthat C and D are specified using different coordinate systems.One way out of this difficulty is, instead of trying to join C and D, to shiftthe line AB to the position of BD. The \rput command in <strong>PSTric</strong>ks fills thebill here. Thus the above figure (<strong>with</strong>out the labels) can be drawn thus:\begin{pspicture}(0,0)(6,2.5)\psset{linecolor=Blue}\psline(0,0)(5,0)\SpecialCoor\psline(0,0)(3;60)\rput(3;60){\psline(0,0)(5,0)}\psline[origin={-5,0}](0,0)(3;60)\end{pspicture}Look at the way the \rput command is used. The \psline(0,0)(5,0) isBOnline L A T E X TutorialPart II – Graphics<strong>PSTric</strong>ksE Krishnan, CV Radhakrishnan and AJ Alexconstitute the <strong>graphics</strong> tutorial team.Comments and suggestions may be mailed totutorialteam@tug.org.inc○2002, 2003, The Indian T E X Users GroupThis document is generated by PDFT E X <strong>with</strong>hyperref, pstricks, pdftricks and pdfscreenpackages in an intel PC running GNU/LINUXand is released under LPPLThe Indian T E X Users GroupFloor iii, sjp Buildings, Cotton HillsTrivandrum 695014, indiahttp://www.tug.org.in£ ¡ ¢ ¤ ¥ ¦ © 3/22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!