summaryrefslogtreecommitdiff
path: root/graphics/epix/samples/golden_rect.xp
blob: f6fc6d54a125eaeb29842119772585fffe1c24dd (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
/* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;

const double tau((1+sqrt(5))/2);

int main() 
{
  bounding_box(P(0,0), P(tau,1));
  picture(100*(1+tau), 100*tau);
  unitlength("0.0125in");

  begin();

  dashed();
  line(P(0.5,0), P(0.5,1));

  solid();
  line(P(1,0), P(1,1));
  line(P(0.5,0), P(1,1));

  arc(P(0.5,0), tau-0.5, 0, Atan(2.0));
  
  bold();
  rect(P(0,0), P(tau, 1));

  end();
}