summaryrefslogtreecommitdiff
path: root/graphics/epix/doc/plot_a.xp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/epix/doc/plot_a.xp')
-rw-r--r--graphics/epix/doc/plot_a.xp27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/epix/doc/plot_a.xp b/graphics/epix/doc/plot_a.xp
new file mode 100644
index 0000000000..4304d501d3
--- /dev/null
+++ b/graphics/epix/doc/plot_a.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(6, 20));
+
+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();
+}