graphing data

Anyone know of some good examples of drawing graphs in an opengl window? Im developing in VC environment.
Thanx for any help

To draw a graph in an opengl window, use the glortho function.
U can draw axis with lines and u’r graph is a list of vertex2f that u join thanks to GL_LINES

HOpe it wil help

Thanx jc. But a hard coded line on the graph is kind of useless…wondering if an opengl app can graph in real time??

Hard coded? Don’t use literal constants when you call glVertex2f(). Put in some variables and then any changes you make to those variables occur immediately.


If you want to draw mathematic function in real time you must code function parser for it!! the you can draw graphs!!

Just being curious, how do you do the code for the Grapher (function grapher).

About six years ago I released an expression parser/evaluator that is completely free and open (use it in any way you see fit). It’s in C and is easily incorporated into other programs. You could use this to allow user-entered formulae that you would then graph. It supports function calls (sin, cos, tan, etc), variables, and constants.


[This message has been edited by Toom (edited 12-21-2000).]