summaryrefslogtreecommitdiff
path: root/graphics/epix/doc/layout.xp
blob: cd3e2010111bafb52ce781073ec7ca55a29c55c0 (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
30
31
32
33
34
35
36
/* -*-ePiX-*- */
/* layout.xp -- June 27, 2007 */
#include "epix.h"
using namespace ePiX;

const double a(sqrt(3));
P f(double u, double v)
{
  return P((u-v)*(u+v), 2*u*v, u); //u*(u-a*v)*(u+a*v));
}

int main()
{
  picture(P(0,0), P(2,3), "5x7.5in");

  begin();

  domain R(P(-1,-1), P(1,1), mesh(12,12), mesh(24,24));

  for (int i=0; i<2; ++i)
    for (int j=0; j<3; ++j)
      {
        screen my(P(-3,-3), P(3,3));
        activate(my);
        border(Red(0.6), "1pt");
	camera.at(sph(10, (2*j+i+1)*M_PI/8, M_PI/6));

	plot(f, R);
	arrow(P(0,0,0), 2*E_1);
	arrow(P(0,0,0), 2*E_2);
        inset(P(i+0.05,2.05-j), P(i+0.95,2.95-j));
      }

  end();
}