Graph Toy, an interactive graph visualizer using mathematical functions
memorystomp.com
memorystomp.com
It's like this, except that beyond drawing single-argument f(x) -> y functions, it also draws f(x, y) -> z heatmaps, f(x, y) -> (R, G, B) colored heatmaps, f(x, y, z) -> (R, G, B) volumetric 3D graphics, and all these have also a f(..., t) -> ... variant for animations. And then you dig in and discover it somehow also has keyboard & mouse input handling, can play sounds (and can be used for live procedural music), simulate a piano keyboard, and probably a bunch of other stuff I'm forgetting. It was my go-to tool for visualizing any kind of math back during the university years.
In fact, I just took a look at it again (after not using it for years) and I discovered it has networking capability, IDE features, and - I kid you not - it seems to compile the scripts down to native code, offering a helpful x86 ASM output in the built-in debugger. It can dump executables, has bindings to OpenGL and support for old-school VR (colored stereoscopic, NVidia 3DVision).
All in an executable that weighs 746 KB.
It's hands-down one of the most impressive pieces of software I have ever seen.
http://advsys.net/ken/download.htm#evaldraw
EDIT: And if you give it a try, be sure to check some of the ridiculous amount of examples it comes bundled with, which include games, explorable explanations, infinite calendars, optical systems simulations, and a whole host of other stuff.
"Carmack: Well there's a big difference between who I consider the most talented and who I would necessarily hire, because you have to hire people that fit right. If I had to pick who I think is just the most talented, it would probably be Ken Silverman, the guy that did the BUILD engine. He does engines and tools. He's great as an editor. He writes all the code for everything, and he's just extremely talented. I think it was 3D Realms' worst decisions not to coddle him, or whatever it took, to keep him on board. I think if he was still working directly for 3D Realms, they would have a Quake-type game shipped by now, just because he's extraordinarily good."
http://advsys.net/ken/carmken.htm
—and he's now working on the voxel display project that was on HN yesterday: https://news.ycombinator.com/item?id=25549717
(Kind of a tangent, but this reminds me of Red lang and Factor lang. Both are tight, tiny (by modern standards), self-contained, and produce native code. I wish some other languages (like Haskell and Python) had similar setups. "That would be sooo cooool.")
If interested, here are a few thoughts:
- It might be good to link directly to IQ's version of GraphToy, rather than his homepage.
- I dig the white background option!
- The create link feature is a bit smoother than the original.
- The download image button is a great idea, though I just realized with both versions you can right click to save the image, without needing a new tab. One thing that occurred to me -- it would be killer if the download image version popped up an SVG render with a higher sampling rate, instead of pixels! A little text or UI could clarify how to save a pixel version vs a vector rendering.
- I like the escalator function used to demo the time variable! I've used that very function on ShaderToy.
- It would be super nice if the plot window used a flexbox or grid layout to stretch to fill the window. It's currently a bit smaller than IQ's and doesn't resize.
- Might also be nice to have the help box be a popup you can click (the way it works in ShaderToy), and maybe put the variables underneath the plot, to allow the plot to expand to basically full screen?
Anyone discover any cool graphs to share?
For example, the simplest one producing something interesting I've found so far is:
t%x
Which creates a growing jagged triangular graph when you press "play" for the "t" constant.Naturally, this can be built upon to make weirder and weirder graphs, ex:
sin(t%x)or even
sin(b * x * t/clamp(b/10,x/t,t)) * x * clamp(b/40 * t,x/10,t)
or sin(b * x * t/clamp(b/10,x / t,t)) * x * clamp(b/40,x/10,t)
or sin( b * x * t/clamp(b/10,x/t,t)) * x * (x-x * x) * clamp(b/4,sin (x * t) * x/10,t)
noise(t*x)*(x+1)
There was a hypnotic graphic effect on my phone. As the wave phased between modes it appears to be a smooth wave after a threshold (graph sample aliasing?), a cyclic standing envelope like angular frequency, in t. Quite nice.