Scripted vector drawing app (à la Satimage Smile)
MetaPost

An open source and complete picture drawing language, with plenty of support and documentation, is MetaPost.


  The MetaPost system (by John Hobby) implements a picture-drawing language very much like that of MetaFont; the difference is that MetaPost outputs vector graphic files instead of run-length-encoded bitmaps; output formats available are PostScript and SVG.


MetaPost is capable of creating complex images and shapes:



beginfig(11)
    pair A, B, C;
    A:=(0,0); B:=(1cm,0); C:=(0,1cm);
    draw A--B;
    draw B--C dashed evenly;
    draw C--A dashed withdots;

endfig;




beginfig(117)
  u:=2cm;
  pair A, B, C, D, E;
  path p, q, r;

  A = u*up;
  p := (-.2)[ A, A rotated 72 ] -- (1.2)[ A, A rotated 72 ];
  for i=0 upto 5:
    draw p rotated 72i;
  endfor;
  B := 1/2[ A, A rotated 72 ];
  C := .8*B;

  p := B --- C .. (C rotated (2*72)){right};
  % On allonge le chemin p
  p := ( (point 0 of p) - 4mm*unitvector(direction 0 of p))
       --
       (point 0 of p)
       &amp; p &amp;
       (point 2 of p)
       --
       ( (point 2 of p) + 4mm*unitvector(direction 2 of p));

  E = p intersectionpoint (p rotated 72);
  q := p cutbefore fullcircle scaled -2mm shifted E;
  r := p cutafter fullcircle scaled  2mm shifted E;

  for i=0 upto 4:
    draw q rotated 72i;
    draw r rotated 72i;
    draw A rotated 72i withpen pencircle scaled 4bp;
    draw B rotated 72i withpen pencircle scaled 4bp;
    draw C rotated 72i withpen pencircle scaled 4bp;
  endfor;
endfig;


You can install MetaPost as part of BasicTex.

Sketch

Aimed more at designers than engineers, Sketch offers a programmable interface and AppleScript support.

Side Note

As an aside, Apple once distributed a sample vector drawing application also called Sketch. One purpose of Sketch was to demonstrate how to incorporate AppleScript into an application.