/usr/share/doc/epix/examples/polar.xp is in epix 1.2.18-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 | /* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;
double f(double t)
{
return 2*Cos(3*t);
}
int main()
{
picture(P(-2,-2), P(2,2), "2x2in");
begin();
degrees();
black(0.3);
polar_grid(2, 4, 24); // radius, rings, sectors
black();
bottom_axis(4, P(0,-4)).subdivide(2).draw();
left_axis(4, P(-4,0)).subdivide(2).draw();
bold();
polarplot(f, 0, 180, 120); // plot over [0, 180] using 120 intervals
end();
}
|