Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2014
187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. prologues := 3;
  2.  
  3. g_use_svg = 0;
  4.  
  5. outputtemplate := "%j-%c.mps";
  6. outputformat := "mps";
  7. if g_use_svg > 0:
  8. outputtemplate := "%j-%c.svg";
  9. outputformat := "svg";
  10. fi
  11.  
  12. beginfig(4);
  13. path circle;
  14.  
  15. % Scale everything
  16. w = 5in;
  17.  
  18. % Plate
  19. pickup pencircle scaled 3;
  20. circle = fullcircle scaled 1w;
  21. draw circle;
  22. show circle;
  23.  
  24. % Legend.
  25. pair hours[];
  26. pair twelve;
  27. rgbcolor c;
  28. c = (0.9, 0.1, 0.1);
  29. pickup pencircle scaled 10;
  30. twelve = (0, 0.9w/2);
  31. show twelve;
  32. for i = 0 upto 12:
  33. hours[i] = twelve rotated (30*i);
  34. draw hours[i] withcolor c;
  35. show hours[i];
  36. label.bot("x", hours[i]);
  37. endfor
  38.  
  39. % Hour pointer.
  40. pickup pencircle scaled 10;
  41. drawarrow origin--(0, 0.70w/2) rotated -90;
  42. drawdot(w/2,w/2);
  43. endfig;
  44. end
Advertisement
RAW Paste Data Copied
Advertisement