2D, 3D Graphs

I want to start working on a 2-D & 3-D graphs lib. from where i should start? how to make all 3 axes ? can i get any source code, if anybody already worked on the same type of things? I have knowledge of OpenGL & VC++
Thanx :Pors

[This message has been edited by porsgl (edited 03-12-2002).]

I guess you are talking about 2D & 3D bar and pie chart graph’s, I have see some examples around on making 3D graph’s. Do a search on this web site, there was a post on a main page a few week’s back on it.

Or is it graph’s of mathmatics plot’s you want to do?

Let me know which, the bar’s and pie charts are very easy to do. I will go into more detail if that is the case.

Originally posted by porsgl:
[b]I want to start working on a 2-D & 3-D graphs lib. from where i should start? how to make all 3 axes ? can i get any source code, if anybody already worked on the same type of things? I have knowledge of OpenGL & VC++
Thanx :Pors

[This message has been edited by porsgl (edited 03-12-2002).][/b]

Thank You very much… Ya!! you are right i want to go for mathemtics plots like you have seen in MatLab. have any idea?

I have a few theories in my head (forgive me if they are obvious). The axis are simply a set of GL_LINES. The plots are lines points or surfaces. You’ll have to write a parser or something to convert an equation into a plotting function but that should be simple. Then all you’ll have to do is handle I/O and your Viewing transformations.

The openGL part is the easy part, the main part of your program will be handling the input of the math function and creating the data of the function.

First thing is you will need to create a syntax for entering you math function.

example of ploting x:
r = 2 create the varibles of the function
angle = 45 to 90
x = r * cos(angle) define the function.
plot x plot it!

Writing your program to take this and plot the data will be the hard part.

Originally posted by porsgl:
Thank You very much… Ya!! you are right i want to go for mathemtics plots like you have seen in MatLab. have any idea?

thank you for ur ideas… Pors