Hello! For the next update to CCGrapher, Wobbo and I have decided to use an API that can be implemented from any program to graph equations. For instance, if you have a program that shows a turtles fuel level over time, you could use this API for any equation solving / custom graphing involved (obviously it would be used in a much more complex situation than the one presented for the sake of example).

Code: http://pastebin.com/R34EmcSy

Features:
- Derivatives
- Implicit equations
- Newton-Raphson method
- Stronger equation constructor (saves results, table-based)

How to use (For further reading, refer to the code for excellent documentation by Wobbo!):

local eq = dofile("eq") --# replace with whatever you named the api
local fx, fy = eq:impl("34 * y ^ 5 = x ^ 3")
print(fx[234]) --# prints the value of y when x = 234, notice that equations are thought of as tables that hold inputs and outputs rather than a functions that calculates inputs and outputs.
print(fx[234]) --# same thing, but much faster as the result was saved last time so it didn't need to be recalculated.
local func = function(x) return x ^ 2 end
local f = eq.eq(func) --# makes f a table based function as shown above
local fprime = eq.derive(func) --# derivative of f
fprime = eq.eq(fprime) --# makes it table based