Exemples de la distribution (extras)

En cliquant sur une imagette, vous accéderez au source et à l'image. En cliquant sur cette dernière, vous ouvrirez le fichier PDF associé.

butterfly.xp
conic.xp [ source ] [ fermer ]
conic.xp
/* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;

const int MAX=24;
const double x0 = 4;
const double ht=3; // camera height

P f(double t) { return P(t, t*t, 0); }

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

  begin();

  grid(1,1);

  label(P(x_min, y_max), P(2,-2), 
	"Projective equivalence of a parabola and a circle", br);

  crop();

  viewpoint(0,-ht*ht, ht);
  camera.look_at(P(0,0,1));

  green(0.7);
  grid(P(-MAX,0), P(MAX, MAX*MAX), MAX, MAX*MAX/8);
  grid(P(-MAX, 0, 2*ht), P(MAX, MAX*MAX, 2*ht), MAX, MAX*MAX/8);

  red();
  envelope(f, -MAX/2, MAX/2, 40); // envelope of tangent lines

  blue();
  Line(P(-100, EPIX_INFTY, 0), P(100, EPIX_INFTY, 0));

  masklabel(P(0,0), P(0,2), "$(0,0)$", t);
  label(P(0,EPIX_INFTY), P(0,-2), "$(0,\\infty)$", b);
  label(P(-0.25*EPIX_INFTY,EPIX_INFTY), P(0, 2), "Horizon", t);

  label(P(x0, x0*x0), P(-2,-2), "$y=x^2$", l);

  box(P(0,0));
  box(P(0,EPIX_INFTY));

  pen(1);
  plot(f, -MAX, MAX, 240);

  end();
}
decorate.xpdemoivre.xpdensityplot.xpdipole.xpgolden_rect.xphyperboloid.xplog.xplorenz.xpminkowski.xpplot_data.xpR_demo.xpsaddle.xpspherical.xpstereo-left.xpstereo-right.xptori.xpvfield.xp