void drawArrowLine(int _i){

_i = _i-1;//toget rid of point at front

float strokewidthc = 10; // how much to times vector 

float strokewidthd = 10; // how much to times vector 

Vec2d a = drawLinePoints[_i];// point 1

Vec2d b = drawLinePoints[_i+1]; // point 2

  

  Vec2d v = b-a; // get vector minus two point vects

  Vec2d vp;

  

  vp.x = v.y *-1.0;// times by inverse cosine is inversly proportional to sine

  vp.y = v.x;

  

  vp.normalize();

  Vec2d c = a + vp * 20 - (v *2);

  Vec2d d = a - vp * 20 - (v *2);

    // draw arrow

   glVertex2f(a.x, a.y); // puts points

   glVertex2f(c.x, c.y); // puts points

   glVertex2f(a.x, a.y); // puts points

   glVertex2f(d.x, d.y); // puts points

   glVertex2f(a.x, a.y); // puts points

   glVertex2f(b.x, b.y); // puts points

}