given a set of x,y coordinates, what is the simplest way to plot the data? I want to be able to just plot the points and then I want to be able to draw a curve through the points. Thanks

Jefft,

To plot 2d points you may use glVertex2i(x,y).

```
glBegin(GL_POINTS);
glVertex2i(x, y);
glEnd();
```

Drawing points very simple like above code, but you are not asking this, do you?

OK… next question… When I create a window, the origin (0,0) is at the center. All points I need to plot will be in the first quadrant (positive x, positive y). Is there a way to shift the view or something to only show the first quadrant?

Look up glOrtho. It creates a projection matrix and you can use it map any part of the coordinate system to your window.

If the resolution of your rendering window is 400x300, set your projection matrix with:

gluOrtho2D(0, 400, 0, 300);

This gives you Quadrant 1 only. The origin (0,0) is the lower-left corner and (399,299) would be the top-right corner.

==song==