File: plot_b.xp

package info (click to toggle)
epix1 1.0.19-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,432 kB
  • ctags: 1,529
  • sloc: cpp: 8,250; sh: 4,716; lisp: 667; makefile: 229
file content (27 lines) | stat: -rw-r--r-- 403 bytes parent folder | download
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
/* -*-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, 18), mesh(12,60));

int main() 
{
  bounding_box(P(-1,-1),P(1,1));
  unitlength("1in");
  picture(2,2);

  begin();
  revolutions();

  camera.at(P(3, 1, 3));

  plot(f, R);

  end();
}