void drawPoints(){

float spacing=20;

  //printf( "%f %f\n",  mouseDX,mouseDY );

  Vec2d v = Vec2d();

  //if ( mouseX != prevX || mouseY != prevY){//without spacing

  if ((mouseDX - spacing >= prevX || mouseDX + spacing <= prevX) || (mouseDY - spacing >= prevY || mouseDY+spacing<= prevY)){


     v.x =  mouseDX;

     v.y =  mouseDY;

     prevX = v.x;

     prevY = v.y;

  drawLinePoints[pointCounter] = v;

pointCounter++;

printf( "%f %f\n",  mouseDX, mouseDY );

  

  }

  for (int i = 0; i < pointCounter; i++){

     Vec2d p = drawLinePoints[i];

drawLine(i);

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

printf( "%f %f\n", p.x,p.y);

}



}