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.

Appendix—Math in PostScriptWe’ve given a few examples of specifying coordinates using raw PostScriptcode in the section on “Special Coordinates”. Here we give a list of mathematicaloperators available in this language and their syntax.More on CoordinatesCoordinate gridsChanging sizeAnother type of coordinatesMore special coordinatesChanging the systemSetting parametersoperator meaning syntaxexamplePostScript codevalueadd sum of two numbers number1 number2 add 7 2 add 9submuldivdifference of twonumbersproduct of twonumbersquotient of twonumbersnumber1 number2 sub 7 2 sub 5number1 number2 mul 7 2 mul 14number1 number2 sub 7 2 div 3.5Online L A T E X TutorialPart II – Graphics<strong>PSTric</strong>ksexp power of a number number1 number2 exp 7 2 exp 49idivintegral part of thequotient of twointegersnumber1 number2 idiv 7 2 idiv 3modsqrtreminder obtainedon dividing aninteger by an integersquare root of anumbernumber1 number2 mod 7 2 mod 1number sqrt 16 sqrt 4neg negative of a number number neg 7 neg −7absceilingabsolute value of anumbersmallest integergreater than or equalto a numbernumber abs -7 abs 7number ceiling 7.6 ceiling 8E 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£ ¡ ¢ ¤ ¥ ¦ © 22/23

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

Saved successfully!

Ooh no, something went wrong!