diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/epix/doc/plot_b.xp |
Initial commit
Diffstat (limited to 'graphics/epix/doc/plot_b.xp')
-rw-r--r-- | graphics/epix/doc/plot_b.xp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/epix/doc/plot_b.xp b/graphics/epix/doc/plot_b.xp new file mode 100644 index 0000000000..f7560071e9 --- /dev/null +++ b/graphics/epix/doc/plot_b.xp @@ -0,0 +1,27 @@ +/* -*-ePiX-*- */ +#include "epix.h" +using namespace ePiX; +P f(double u, double v) +{ + double x=u*Cos(v), y=u*Sin(v); + // return P(x, y, 0.25*x*(x*x-3*y*y)); + return P(x, y, x*y); +} + +domain R(P(0,0), P(1,1), mesh(6, 20), mesh(12,60)); + +int main() +{ + bounding_box(P(-1,-1),P(1,1)); + unitlength("1in"); + picture(1.5,1.5); + + begin(); + revolutions(); + + camera.at(P(3, 1, 3)); + + plot(f, R); + + end(); +} |