Hacker News new | past | comments | ask | show | jobs | submit login

This is based on the original work by Inigo Quilez [1], but adds support for time and custom constants.

[1] http://www.iquilezles.org/apps/graphtoy/




Do you know if the technique for rendering the graphs is similar to the one he outlines at the end of this article? https://www.iquilezles.org/www/articles/distance/distance.ht...


It's not the same technique. That article is describing how to plot functions when drawing them using fragment shaders, via the vertical y-axis distance to the function. So to get a constant width line you have to compensate for the slope of the line. Graph Toy is using line drawing to render the function plots, and samples the function once for every pixel horizontally, so the line width issue it taken care of. It's very easy to pop open your dev tools panel and read the source code, BTW, it's not minified or obfuscated. The drawing routine is called draw().




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: