Difference between revisions of "File:Lca example tree.png"
From PEGWiki
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | This image was generated using the following PostScript source and converted to PNG format using Adobe PhotoShop CS5.1. | ||
+ | <pre> | ||
+ | %!PS-Adobe-3.0 EPSF-3.0 | ||
+ | %%BoundingBox: -150 -100 150 100 | ||
+ | /u {100 mul} def | ||
+ | /umoveto {u exch u exch moveto} def | ||
+ | /ulineto {u exch u exch lineto} def | ||
+ | /uline {newpath umoveto ulineto stroke} def | ||
+ | /circle {newpath 0 360 arc stroke} def | ||
+ | /ctext { | ||
+ | 3 dict begin | ||
+ | /text exch def | ||
+ | /y exch def | ||
+ | /x exch def | ||
+ | gsave | ||
+ | 0 0 moveto | ||
+ | text true charpath pathbbox | ||
+ | exch pop 3 -1 roll pop | ||
+ | exch sub | ||
+ | grestore | ||
+ | 2 div neg y add | ||
+ | x text stringwidth pop 2 div sub | ||
+ | exch moveto | ||
+ | text show | ||
+ | end | ||
+ | } def | ||
+ | /node { | ||
+ | 4 dict begin | ||
+ | /text exch def | ||
+ | /r exch def | ||
+ | /y exch def | ||
+ | /x exch def | ||
+ | x y r circle | ||
+ | x y text ctext | ||
+ | end | ||
+ | } def | ||
+ | % x1 y1 r1 x2 y2 r2 | ||
+ | /ccline { | ||
+ | 7 dict begin | ||
+ | /r2 exch def | ||
+ | /y2 exch def | ||
+ | /x2 exch def | ||
+ | /r1 exch def | ||
+ | /y1 exch def | ||
+ | /x1 exch def | ||
+ | /angle y2 y1 sub x2 x1 sub atan def | ||
+ | newpath | ||
+ | x1 r1 angle cos mul add | ||
+ | y1 r1 angle sin mul add | ||
+ | moveto | ||
+ | x2 r2 angle cos mul sub | ||
+ | y2 r2 angle sin mul sub | ||
+ | lineto | ||
+ | stroke | ||
+ | end | ||
+ | } def | ||
+ | /Arial findfont | ||
+ | 21 scalefont | ||
+ | setfont | ||
+ | |||
+ | 0.8 setlinewidth | ||
+ | 8 dict begin | ||
+ | /A { 0.15 u 0.70 u 0.15 u } def | ||
+ | /B { -0.60 u 0.00 u 0.15 u } def | ||
+ | /C { 0.90 u 0.00 u 0.15 u } def | ||
+ | /D { -1.20 u -0.70 u 0.15 u } def | ||
+ | /E { -0.60 u -0.70 u 0.15 u } def | ||
+ | /F { -0.00 u -0.70 u 0.15 u } def | ||
+ | /G { 0.60 u -0.70 u 0.15 u } def | ||
+ | /H { 1.20 u -0.70 u 0.15 u } def | ||
+ | A (A) node | ||
+ | B (B) node | ||
+ | C (C) node | ||
+ | D (D) node | ||
+ | E (E) node | ||
+ | F (F) node | ||
+ | G (G) node | ||
+ | H (H) node | ||
+ | A B ccline | ||
+ | B D ccline | ||
+ | B E ccline | ||
+ | B F ccline | ||
+ | A C ccline | ||
+ | C G ccline | ||
+ | C H ccline | ||
+ | end | ||
+ | </pre> |
Latest revision as of 18:59, 11 December 2011
This image was generated using the following PostScript source and converted to PNG format using Adobe PhotoShop CS5.1.
%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: -150 -100 150 100 /u {100 mul} def /umoveto {u exch u exch moveto} def /ulineto {u exch u exch lineto} def /uline {newpath umoveto ulineto stroke} def /circle {newpath 0 360 arc stroke} def /ctext { 3 dict begin /text exch def /y exch def /x exch def gsave 0 0 moveto text true charpath pathbbox exch pop 3 -1 roll pop exch sub grestore 2 div neg y add x text stringwidth pop 2 div sub exch moveto text show end } def /node { 4 dict begin /text exch def /r exch def /y exch def /x exch def x y r circle x y text ctext end } def % x1 y1 r1 x2 y2 r2 /ccline { 7 dict begin /r2 exch def /y2 exch def /x2 exch def /r1 exch def /y1 exch def /x1 exch def /angle y2 y1 sub x2 x1 sub atan def newpath x1 r1 angle cos mul add y1 r1 angle sin mul add moveto x2 r2 angle cos mul sub y2 r2 angle sin mul sub lineto stroke end } def /Arial findfont 21 scalefont setfont 0.8 setlinewidth 8 dict begin /A { 0.15 u 0.70 u 0.15 u } def /B { -0.60 u 0.00 u 0.15 u } def /C { 0.90 u 0.00 u 0.15 u } def /D { -1.20 u -0.70 u 0.15 u } def /E { -0.60 u -0.70 u 0.15 u } def /F { -0.00 u -0.70 u 0.15 u } def /G { 0.60 u -0.70 u 0.15 u } def /H { 1.20 u -0.70 u 0.15 u } def A (A) node B (B) node C (C) node D (D) node E (E) node F (F) node G (G) node H (H) node A B ccline B D ccline B E ccline B F ccline A C ccline C G ccline C H ccline end
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 05:38, 11 December 2011 | 833 × 556 (36 KB) | Brian (Talk | contribs) | nodes and labels are larger | |
05:32, 11 December 2011 | 360 × 230 (37 KB) | Brian (Talk | contribs) |
- You cannot overwrite this file.
File usage
The following page links to this file: