prologues := 2; % defaultfont := "cmr10"; % Palatino default font defaultfont := "pplb8r"; verbatimtex %&latex \documentclass[12pt]{article} \usepackage{palatino} \usepackage{mathpple} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \begin{document} etex tracingequations := 1; ahlength := 7pt; % timeline tmin := 1960; tmax := 2000; pair tl.n, tl.s; xpart tl.n = xpart tl.s; ypart tl.s = ypart tl.n - totalheight; totalheight = ellipseheight * 18; def AdjustToTimeline(suffix $)(expr pubyear) = ypart $.c = ypart ((pubyear-tmin)/(tmax - tmin))[tl.n, tl.s]; enddef; picture yl[].yeartext; pair yl[].c; boolean yl[].drawn; def Year(suffix $)(expr pubyear) = $.yeartext := thelabel(decimal pubyear, origin) scaled 1.5; xpart $.c = xpart tl.n; AdjustToTimeline($, pubyear); draw $.yeartext shifted $.c; enddef; def DrawYears = for pubyear = tmin step 5 until tmax: Year(yl[pubyear], pubyear); endfor; enddef; % development lines def DevelopmentLines(text lines) = count := 0; forsuffixes line = lines: count := count + 1; endfor; index := 0; gridwidth = ellipsewidth * 2; forsuffixes line = lines: line = xpart tl.n - (count - index) * gridwidth; index := index + 1; endfor; enddef; def AdjustToLine(suffix $, line) = xpart $.c = line; enddef; % language nodes mecw := 0; mech := 0; def Shadow(expr p) = fill p shifted (1mm, -1 mm) withcolor (0.6, 0.6, 0.6); enddef; def LanguageC(suffix $, line)(expr title, pubyear, col) = pair $.c, $.n, $.s, $.e, $.w; $.height = ellipseheight; $.width = ellipsewidth; xpart $.n = xpart $.c = xpart $.s; ypart $.w = ypart $.c = ypart $.e; $.c = 1/2[$.n,$.s] = 1/2[$.w,$.e]; ypart $.n - ypart $.s = $.height; xpart $.e - xpart $.w = $.width; % adjust it to our grid AdjustToTimeline($, pubyear); AdjustToLine($, line); % create text ellipse picture $.caption; $.caption = thelabel(title, origin); cw := xpart(lrcorner $.caption - llcorner $.caption); ch := ypart(ulcorner $.caption - llcorner $.caption); if cw > mecw: mecw := cw; fi; if ch > mech: mech := ch; fi; boolean $.drawn; $.drawn := false; vardef $.Draw = if not $.drawn: path circle, $.p; % xscaling a circle produces a better ellipse than % the ... operator as we need assymmetric Bézier control points circle := ($.n .. (xpart $.c + $.height/2, ypart $.c) .. $.s .. (xpart $.c - $.height/2, ypart $.c) .. cycle) shifted -$.c; $.p := circle xscaled ($.width/$.height) shifted $.c; Shadow($.p); fill $.p withcolor col; draw $.p; draw $.caption shifted $.c; $.drawn := true; fi; enddef; enddef; def Language(suffix $, line)(expr title, pubyear) = LanguageC($, line, title, pubyear, (.94, .90, .67)); enddef; def ThisLanguage(suffix $, line)(expr title, pubyear) = LanguageC($, line, title, pubyear, (1, .4, .16)); enddef; def Arrow(suffix a, b) = a.Draw; b.Draw; path dline; dline := a.c -- b.c; pair pfrom, pto; pfrom := dline intersectionpoint a.p; pto := dline intersectionpoint b.p; drawarrow pfrom -- pto; enddef; def DrawIt(text items) = forsuffixes item = items: item.Draw; endfor; enddef; DevelopmentLines(OOLine, CStyle, AlgolLine, PascalLine); Language(Algol, AlgolLine, btex Algol-60 etex, 1960); Language(BCPL, CStyle, btex BCPL etex, 1966); Language(B, CStyle, btex B etex, 1969); ThisLanguage(C, CStyle, btex C etex, 1972); Language(Cpp, CStyle, btex C++ etex, 1985); Language(Simula, OOLine, btex Simula etex, 1967); Language(Smalltalk, OOLine, btex Smalltalk etex, 1980); Language(Eiffel, OOLine, btex Eiffel etex, 1985); Language(Java, OOLine, btex Java etex, 1996); Language(Csharp, OOLine, btex C\# etex, 2001); Language(AlgolSixtyEight, AlgolLine, btex Algol-68 etex, 1968); Language(Pascal, PascalLine, btex Pascal etex, 1970); Language(Modula, PascalLine, btex Modula-2 etex, 1978); Language(CLU, AlgolLine, btex CLU etex, 1974); Language(Ada, AlgolLine, btex Ada etex, 1983); Language(Oberon, PascalLine, btex Oberon etex, 1988); ellipseheight = 3 mech; ellipsewidth = 5/4 mecw; beginfig(1); pickup pencircle scaled 1.5pt; tl.n = origin; DrawYears; Arrow(Algol, AlgolSixtyEight); Arrow(Algol, Simula); Arrow(Algol, Pascal); Arrow(Pascal, Modula); Arrow(Modula, Oberon); Arrow(BCPL, B); Arrow(B, C); Arrow(AlgolSixtyEight, C); Arrow(Pascal, C); Arrow(Simula, Smalltalk); Arrow(Simula, Cpp); Arrow(C, Cpp); Arrow(Smalltalk, Eiffel); Arrow(Eiffel, Java); Arrow(Smalltalk, Cpp); Arrow(Pascal, CLU); Arrow(Modula, Ada); Arrow(CLU, Modula); Arrow(CLU, Cpp); Arrow(CLU, Ada); Arrow(Ada, Cpp); Arrow(Cpp, Java); Arrow(Oberon, Java); Arrow(Java, Csharp); endfig; end.