12.07.2015 Views

graphics with PSTric..

graphics with PSTric..

graphics with PSTric..

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pose we want to draw a triangle <strong>with</strong> sides 2 cm, 3 cm and 4 cm as shownbelow:5cmC4cmMore on CoordinatesCoordinate gridsChanging sizeAnother type of coordinatesMore special coordinatesChanging the systemSetting parametersA6cmBWe can specify A as (0, 0) and B as (6, 0), but what about C? If ∠A = θ,then C has polar coordinates (5, θ). Now from elementary trigonometry, wehave√A = 2 tan −1 (s − b)(s − c)s(s − a)in any triangle ABC <strong>with</strong> BC = a, CA = b and AB = c, where s = 1 2 (a+b+c).For our triangle above, this works out to be√A = 2 tan −1 2.5 × 1.57.5 × 3.5This computation can be done by PostScript and in the syntax of this language,it is written2.5 1.5 mul sqrt 7.5 3.5 mul sqrt atan 2 mul(We will explain this a bit in the appendix to this chapter.) Now by thedevice of including PostScript code in an angle specification using !, we canproduce the above triangle byOnline 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£ ¡ ¢ ¤ ¥ ¦ © 13/23

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

Saved successfully!

Ooh no, something went wrong!