File: proval.ml

package info (click to toggle)
mlpost 0.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,844 kB
  • sloc: ml: 21,094; javascript: 4,047; makefile: 430; ansic: 34; lisp: 19; sh: 15
file content (21 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open Mlpost
open Command
open Path
module T = Transform

let fig =
  let f = 7. in
  let pen = Pen.square ~tr:[ T.yscaled 0.5; T.rotated 40. ] () in
  let check =
    jointpath
      [ (-1.2, 1.2); (0., -2.); (2., 2.); (5., 5.) ]
      [ JLine; JCurve; JCurve ]
  in
  [
    fill ~color:Color.black (transform [ T.scaled f ] Path.fullcircle);
    label ~pos:Pleft (Picture.tex "Pr") (Point.p (f /. -4., 0.));
    label ~pos:Pright (Picture.tex "al") (Point.p (f /. 4., 0.));
    draw ~color:Color.green ~pen check;
  ]

let _ = Metapost.emit "proval" fig