summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/3-5-76.mp
blob: 81b0e403597c7a200fb6d09539c32e896e2b7a65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% --- start of displayed preamble in the book ---
input metaobj
% Polygons etc. as previously defined
% --- end of displayed preamble in the book ---

newPolygon.a(btex apples\strut etex,5);
newPolygon.b(btex oranges\strut etex,6);
newPolygon.c(btex bananas\strut etex,7);
newPolygon.f(btex fruits\strut etex,8);
newEllipse.d(btex potatoes\strut etex);
newDEllipse.e(btex peas\strut etex);
newDBox.v(btex vegetables\strut etex);
newPolygon.fo(btex food\strut etex,12);

defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
newTree.fruits(f)(a,b,c)
  "Lalign(left)", "hideleaves(true)",
  "treemode(L)", "vsep(3mm)";
newTree.vegetables(v)(d,e)
  "Ralign(center)", "hideleaves(true)",
  "treemode(R)";
newTree.food(fo)(fruits,vegetables)
  "hsep(1cm)";
scaleObj(food,.7);food.c=origin;
newDEllipse.ff(food);
ff.c=origin;drawObj(ff);
endfig;
end;