views:

416

answers:

2

After making a quadratic equation solver for the iPhone I want to take it a step further by giving the user the ability to view the graph of the solved quadratic equation. I need some guidance on how to do so using the iPhone SDK and the available frameworks.

+1  A: 

CorePlot is a developing framework, but it might be a start.

Abizern
+3  A: 

CorePlot is good for graphing, yes, but it doesn't actually graph equations (unless you already have a list of all the x-y points for the equation). For that I recommend Graham Cox's excellent GCMathParser: http://www.apptree.net/parser.htm

It's pretty easy to use and has support for variables and whatnot. I built a rudimentary graphing calculator in under a day with it.

Dave DeLong
How would I use this with the iPhone SDK. Is there a way to use core graphics to make a grapher?
Omar
Graham's GCExpressionParser is pretty basic Cocoa (parts were generated by Bison, but that shouldn't matter), so you should be able to port it straight across to the iPhone. It can then provide the values you need to display using Core Plot, which runs on the iPhone. Core Plot includes two sample iPhone applications as a demonstration of how to use it.
Brad Larson
@Omar yes. The graphing calculator I built was for the iPhone using CoreGraphics to built a path.
Dave DeLong
I don't understand how to get any of the above things working. On the core-plot website it says that I need to get "CorePlot-CocoaTouch.xcodeproj" which I can not seem to get. @Brad are you saying that I use "Graham's GCExpressionParser" to get values and then use CirePlot to plot the points?
Omar