Advertisement
Guest User

Rotate off origin for CG.SE

a guest
Feb 17th, 2016
1,071
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %!PS-Adobe-3.0 EPSF-3.0
  2. %%BoundingBox: 0 0 400 400
  3. %%Title: Rotate off origin
  4. %%Creator: joojaa
  5. %%CreationDate:  2016-02-17
  6. %%EndComments
  7.  
  8. /drawGrid {
  9.     newpath
  10.     0.2 setlinewidth
  11.     -80 20 80 {
  12.        dup  90 moveto
  13.        dup -90 lineto
  14.        dup  90 exch moveto
  15.            -90 exch lineto  
  16.        } for
  17.     stroke
  18.     newpath
  19.     0.99 setlinewidth
  20.     0  90 moveto 0 -90 lineto
  21.     0  90 0 moveto -90 0 lineto  
  22.     stroke
  23. } def
  24.  
  25. /line {
  26.     gsave newpath
  27.     0 1 0 0 setcmykcolor
  28.     3 0.99 mul setlinewidth
  29.     -20.25 20 moveto 60.5 20 lineto
  30.     20 20 translate 0 0 2 0 360 arc
  31.     stroke grestore
  32. } def
  33.  
  34. 100 300 translate
  35. drawGrid
  36.  
  37. line
  38.  
  39. 200 0 translate
  40. drawGrid
  41. gsave
  42. -20 -20 translate
  43. line
  44. grestore
  45.  
  46.  
  47. -200 -200 translate
  48. drawGrid
  49. gsave
  50. 45 rotate
  51. -20 -20 translate
  52. line
  53. grestore
  54.  
  55. 200 0 translate
  56. drawGrid
  57. gsave
  58. 20 20 translate
  59. 45 rotate
  60. -20 -20 translate
  61. line
  62. grestore
  63.  
  64.  
  65. %%EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement