summaryrefslogtreecommitdiff
path: root/graphics/epix/samples/planes.xp
blob: 385a32194ecd79cbe36cb868618afea4990a4078 (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 int N(20);

int main()
{
  picture(P(-2,-2), P(2,2), "6x6in");

  begin();

  border();
  fill();

  camera.at(P(10,-6,4));
  clip_box(P(-1,-1,-1), P(1,1,1));

  Plane C(P(-1,-1,-1), P(1,1,1));
  for (int i=1; i<N; ++i)
    {
      rgb(i*1.0/N, 0.2, 1-i*1.0/N);
      C.shift((2.0/N)*P(1,1,1));
      C.draw();
    }

  pst_format();
  end();
}