File: planes.xp

package info (click to toggle)
epix 1.2.22-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,256 kB
  • sloc: cpp: 16,847; sh: 5,054; makefile: 159; lisp: 6
file content (29 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (9)
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();
}