Lead calculator engineer here. I'm happy and a little surprised to see our work on the HN front page this morning. We've been at it since 2011.<p>Our biggest goal with the calculator has been to make it easy to immediately see the consequences of changing part of an expression, or changing a parameter in an expression. When you remove the friction, this feels like exploring.<p>Happy to answer any questions.<p>Edit: For the tech crowd, I'll play the "what happens when you type a key on google.com?" game, only for Desmos:<p>1. Your keystroke is interpreted and typeset by the awesome, open source math typesetting library MathQuill: <a href="http://mathquill.com/" rel="nofollow">http://mathquill.com/</a><p>2. Mathquill notifies us that an expression has changed, and gives us a new LaTeX representation of it.<p>3. We send this new expression to a webworker, where we do all of our math processing. This lets us avoid blocking the UI thread, even if the user asks us to do something like a sum from one to a billion.<p>4. In the webworker, the expression LaTeX is parsed and analyzed for dependencies, variable assignments, and function definitions. We mark any other expressions that depend on symbols it exports as dirty, so that we can also reanalyze and replot them.<p>5. We compile the parsed expression (and any other expressions that need to be updated) to javascript by calling "new Function()" on a string representation. Since we need to evaluate these functions at thousands of points for plotting, we've found this to be much more efficient than an interpreter.<p>6. We plot all plottable functions (explicit functions of one variable, implicit functions of two variables, parametric equations, polar equations, inequalities, etc.), and analyze them for discontinuities and points of interest like minima, maxima, and zeros.<p>7. We send a representation of the plotted curves back from the webworker to the frontend, and they are plotted on the graph paper using the HTML5 canvas API.
See the staff-selected art (created with the Desmos Graphing Calculator) for some examples of what robust input looks like: <a href="https://www.desmos.com/art" rel="nofollow">https://www.desmos.com/art</a>
This looks great. I've been using fooplot.com but Desmos is much more polished, so will consider switching.<p>Initial things I like:<p>- Latex representation<p>- Ability to save expressions<p>- Pretty UI<p>Initial issues:<p>- Keyboard shortcuts. I cannot jump to start/end of line.<p>- Copy/paste. I get something like this when copying an expression: "\sqrt{\left(x\right)}"<p>All in all: great job!
Really awesome. I wonder which JS library is used for the
plotting itself ? Is it made by you guys ? Is it open
source ?
Thanks and keep on with the good work !