Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prologues := 3;
- g_use_svg = 0;
- outputtemplate := "%j-%c.mps";
- outputformat := "mps";
- if g_use_svg > 0:
- outputtemplate := "%j-%c.svg";
- outputformat := "svg";
- fi
- beginfig(4);
- path circle;
- % Scale everything
- w = 5in;
- % Plate
- pickup pencircle scaled 3;
- circle = fullcircle scaled 1w;
- draw circle;
- show circle;
- % Legend.
- pair hours[];
- pair twelve;
- rgbcolor c;
- c = (0.9, 0.1, 0.1);
- pickup pencircle scaled 10;
- twelve = (0, 0.9w/2);
- show twelve;
- for i = 0 upto 12:
- hours[i] = twelve rotated (30*i);
- draw hours[i] withcolor c;
- show hours[i];
- label.bot("x", hours[i]);
- endfor
- % Hour pointer.
- pickup pencircle scaled 10;
- drawarrow origin--(0, 0.70w/2) rotated -90;
- drawdot(w/2,w/2);
- endfig;
- end
Advertisement
RAW Paste Data
Copied
Advertisement