/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; P f(double u, double v) { return u*P(Cos(v), Sin(v), u); } int main() { picture(P(-2,-1),P(2,2), "6x4.5in"); begin(); backing(Black()); white(); label(P(0, ymax()), P(0,-2), "\\LARGE$z=x^2+y^2$", b); revolutions(); camera.at(P(3,2,2.5)); red(); polar_grid(1, 8, 36); arrow(P(0,0,0), P(1.25,0,0)); arrow(P(0,0,0), P(0,1.25,0)); label(P(1.25,0,0), P(-2,-2), "$x$", bl); label(P(0,1.25,0), P(2,-1), "$y$", br); fill(); rgb(1,0.8,0.2); domain R(P(0,0), P(1,1), mesh(12,180), mesh(12,180)); scenery my(f, R); my.draw(1); // cull front-pointing facets red(); arrow(P(0,0,0), P(0,0,1)); pen(Blue(1.6), "0.5pt"); fill(Blue(1.4)); scenery my2(f, R); my2.draw(-1); // cull back-pointing facets nofill(); bold(Green()); base(Green(0.6), "1.5pt"); plot(f, R.slice1(1)); pst_format(); end(); }