prologues := 1;
  beginfig(1);
    numeric u; u := 0.5cm;
    %sizes
    numeric h, w, r;
    h = 5u;
    w = 10u;
    r = 6u;
    %Field
    for i := -h step u until h: 
      draw(-w, i)--(w, i);
    endfor;
    for i := -w step u until w: 
      draw(i, -h)--(i, h);
    endfor;
    drawarrow(-w, 0)--(w, 0)
      withpen pencircle scaled 2bp;
    drawarrow(0, -h)--(0, h)
      withpen pencircle scaled 2bp;
    label.rt(btex $X$ etex, (w, 0));
    label.top(btex $Y$ etex, (0, h));
    pair A, B;
    A := (-4u, -3u);
    B := (8u, 3u);
    
    pair X, Y, Z;
    X := A;
    for i := 0 step 1 until 5:
        Y := X + (0, u);
        Z := Y + (2u, 0);
        draw X--Y
          withpen pencircle scaled 2bp withcolor red;
        draw Y--Z
          withpen pencircle scaled 2bp withcolor red;
        X := Z;   
    endfor;

    draw A
      withpen pencircle scaled 6bp withcolor blue; 
    draw B
      withpen pencircle scaled 6bp withcolor blue; 
    label.lrt(btex $A$ etex, A);
    label.lrt(btex $B$ etex, B);
  endfig;
end.    



