/usr/share/doc/epix/examples/plotting2.xp is in epix 1.2.14-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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;
P f(double r, double th)
{
return P(r*Cos(th), r*Sin(th), pow(r, 3)*Cos(3*th));
}
int main()
{
picture(P(-1,-1),P(1,1), "2x1in");
begin();
domain R(P(0,0), P(1, 2*M_PI), mesh(8,40), mesh(16,120));
camera.at(3,1,2); // set the viewpoint
arrow(P(0,0,0), P(1.25,0,0));
arrow(P(0,0,0), P(0,1.25,0));
plain(Blue(1.2));
fill(Yellow()); // shade
surface(f, R);
pst_format();
end();
}
|