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.

8.2. Higher level customizationApart from creating variant objects by merely tweaking the parameter settingsof predefined objects, <strong>PSTric</strong>ks also allows us to create our own <strong>graphics</strong>objects by combining predefined objects in various ways, using the command\pscustom. Let’s look at an example to see this command in action. Suppose(for whatever reason), we want to draw a red club suit shown below:•• •Drawing the top part is easy, using our \bigdots, of the first section.Custom GraphicsSimple customizationHigher level customizationOnline L A TEX TutorialPart II – Graphics<strong>PSTric</strong>ks\psset{unit=1.5cm}\begin{pspicture}(-1,-1)(2,1.5)\bigdots(0,0)(0.8,0)(0.4,0.75)\end{pspicture}•• •Next we draw the stem. The shape of the stem—it can be scaled to the neededsize later—can be drawn using two parabolic arcs and a line segment as shownbelow:We’ve included the arrows to show the direction of drawing. The code forproducing this (<strong>with</strong>out the arrows) is shown below:E Krishnan, CV Radhakrishnan and AJ Alexconstitute the <strong>graphics</strong> tutorial team. Commentsand suggestions may be mailed totutorialteam@tug.org.inc○2004, The Indian TEX Users GroupThis document is generated by PDFTEX <strong>with</strong>hyperref, pstricks, pdftricks and pdfscreenpackages in an intel PC running GNU/LINUXand is released under LPPLThe Indian TEX Users GroupFloor III, SJP Buildings, Cotton HillsTrivandrum 695014, INDIAhttp://www.tug.org.in 6/23

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

Saved successfully!

Ooh no, something went wrong!