View Full Version : 2D, 3D Graphs

porsgl

03-12-2002, 05:07 AM

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).]

nexusone

03-12-2002, 06:43 AM

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.

http://www.opengl.org/discussion_boards/ubb/smile.gif

Originally posted by porsgl:

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).]

porsgl

03-12-2002, 11:03 PM

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

Furrage

03-13-2002, 06:37 AM

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.

nexusone

03-13-2002, 08:22 AM

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?

porsgl

03-14-2002, 07:11 AM

thank you for ur ideas... Pors

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.