3 ms·
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/dist
by wetmore 6y ago
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.htm https://www.iquilezles.org/www/articles/distance/distance.ht...
- dahart 6y agoIt'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().