TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Desmos Graphing Calculator – HTML5 with LaTeX editor

114 pointsby _tjxdabout 9 years ago

8 comments

jwmerrillabout 9 years ago
Lead calculator engineer here. I&#x27;m happy and a little surprised to see our work on the HN front page this morning. We&#x27;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&#x27;ll play the &quot;what happens when you type a key on google.com?&quot; game, only for Desmos:<p>1. Your keystroke is interpreted and typeset by the awesome, open source math typesetting library MathQuill: <a href="http:&#x2F;&#x2F;mathquill.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;mathquill.com&#x2F;</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 &quot;new Function()&quot; on a string representation. Since we need to evaluate these functions at thousands of points for plotting, we&#x27;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.
评论 #11370421 未加载
评论 #11370146 未加载
评论 #11369983 未加载
评论 #11370242 未加载
评论 #11371082 未加载
评论 #11371142 未加载
评论 #11369896 未加载
plinyabout 9 years ago
Hope this doesn&#x27;t get you banned in Germany:<p>\sin \left(x^2+y^2\right)\cdot \left(y^{32}\ -\ x^{32}\ -x\cdot y\right)\ \ =\ 0<p>EDIT: also<p>\sin \left(x^2\ \ +y^2\right)\left(y^{32}\ -\ x^{32}\ -x\cdot y\right)\cdot \left(\frac{\left(x-y\right)}{\left(x-y\right)^2}\cdot \frac{\left(y+x\right)}{\left(y+x\right)^2}\ \right)\ =\ 0
评论 #11371098 未加载
评论 #11370427 未加载
nerdyabout 9 years ago
See the staff-selected art (created with the Desmos Graphing Calculator) for some examples of what robust input looks like: <a href="https:&#x2F;&#x2F;www.desmos.com&#x2F;art" rel="nofollow">https:&#x2F;&#x2F;www.desmos.com&#x2F;art</a>
dcgossabout 9 years ago
I&#x27;m actually amazed that this is news to the HN crowd. Desmos is in the standard vocabulary of many students.
sqrenabout 9 years ago
This looks great. I&#x27;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&#x2F;end of line.<p>- Copy&#x2F;paste. I get something like this when copying an expression: &quot;\sqrt{\left(x\right)}&quot;<p>All in all: great job!
评论 #11379815 未加载
mguijarrabout 9 years ago
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 !
评论 #11370724 未加载
dguestabout 9 years ago
Awesome. I created a HN account just to upvote this.
0942v8653about 9 years ago
iPhone app:<p>Desmos Graphing Calculator by Desmos <a href="https:&#x2F;&#x2F;appsto.re&#x2F;us&#x2F;Kl-8M.i" rel="nofollow">https:&#x2F;&#x2F;appsto.re&#x2F;us&#x2F;Kl-8M.i</a>