Graphing Math Functions

General FreeBASIC programming questions.
Post Reply
jonbobbly
Posts: 37
Joined: Jun 20, 2007 17:45
Location: Sioux Falls, South Dakota
Contact:

Graphing Math Functions

Post by jonbobbly »

I'm in need of a program to graph functions like y=2x-3 or y=x^2-7 and stuff like that. I can make code to draw the window and do most of the stuff I need, but I don't want to edit the source code every time I want to change the function.

This means that I need a parser. Something that I really don't know how to write for reading equations.

Any help is much appreciated.

(btw, I'm sorry if this doesn't make sense, I wrote it at 12:27am.)
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Post by VirusScanner »

If you are just looking for a program that can graph these functions, look at SpeQ (http://www.speqmath.com/). It's really a very nice calculator.

If you need to write your own program for whatever reason, let me know and I'll try to help. In the meantime, I believe there have been some programs on the forum that have good math expression parsers. You may want to search for some of them.
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

I'm going to make a GUI for my MiniCalc any day now - hopefully this week. It will allow graphing. You can try editing the text-mode program if you want. :-)
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Graphing Math Functions

Post by dodicat »

jonbobbly wrote:I'm in need of a program to graph functions like y=2x-3 or y=x^2-7 and stuff like that. I can make code to draw the window and do most of the stuff I need, but I don't want to edit the source code every time I want to change the function.

This means that I need a parser. Something that I really don't know how to write for reading equations.

Any help is much appreciated.

(btw, I'm sorry if this doesn't make sense, I wrote it at 12:27am.)
I,ll email you a complete parser which can be a runner, or include file.
The code is too big to post here, Ive tried in the past and failed.
Easy to use, fast and efficient.
Gives roots/turning points of functions if required.
Let me know, and I'll send it off to you.
jonbobbly
Posts: 37
Joined: Jun 20, 2007 17:45
Location: Sioux Falls, South Dakota
Contact:

Post by jonbobbly »

Thanks! This looks like a very impressive piece of code. I'm pretty sure that this will be able to do what I'm looking for.
Post Reply