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.
+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
2009-07-07 17:24:59
How would I use this with the iPhone SDK. Is there a way to use core graphics to make a grapher?
Omar
2009-07-07 17:38:38
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
2009-07-07 18:39:29
@Omar yes. The graphing calculator I built was for the iPhone using CoreGraphics to built a path.
Dave DeLong
2009-07-07 19:13:59
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
2009-07-08 09:22:37