The shadows lurking in the equations

(gods.art)

133 points | by calebm 3 hours ago ago

33 comments

  • ethanlipson 2 hours ago

    Neat, but I think it's deceptive for the website to claim this is a "new type of graphing" [1]. The fuzzy graph of F(x, y) = 0 is simply a 3D plot of z = |F(x, y)|, where z is displayed using color. In other words, F(x, y) is a constraint and z shows us how strongly the constraint is violated. Then the graph given by F(x, y) = 0 is a slice of the 3D graph. If you're claiming that you've discovered visualizing 3D graphs using color, you're about 50 years too late.

    [1] https://gods.art/fuzzy_graphs.html

    • amavect an hour ago

      I thought the same, so I programmed the examples into Desmos 3D (click the show/hide buttons on the left).

      https://www.desmos.com/3d/3divdux6jh

      Dropping the absolute value makes a better visualization. The 3D graph for Example 4 Shadow Line has an established name, a hyperbolic paraboloid. The color graph for Example 5 Phi Equation doesn't capture the odd symmetry F(x,y)=-F(-x,y). The color graph for Example 6 Underwater Islands looks far inferior to the 3D surface.

    • roywiggins an hour ago

      People can play with graphing these in 3D and 2D here:

      https://c3d.libretexts.org/CalcPlot3D/index.html

      https://www.desmos.com/3d

    • almogaver07 an hour ago

      I'm wondering if there are topological tools to find the hyperplane of self-intersection from that surface, which is actually the solution of the equation? Or if given a fuzzy graph z=|F(x,y)| we can use differential geometry to find 0=F(x,y)? Does any of the these questions make sense?

      • ethanlipson an hour ago

        For a general function F, finding the points (x, y) with F(x, y) = 0 has no closed-form solution. The entire field of mathematical optimization is largely dedicated to finding solutions to F(x, y) = 0, in one form or another.

        When F has a special structure (say, low-order polynomial), we can actually find the exact solutions. More general structure (e.g. convexity, differentiability) doesn't give us the exact solution, but it lets use use clever numerical algorithms to find them. There are techniques we can use when F has little to no structure, known as "black box" methods, and they work particularly well when we have few variables. In the case of "fuzzy graphs", there are only two variables, so this software takes the approach of computing F(x, y) for every pixel on the screen. In general this doesn't work due to the curse of dimensionality, but it creates good visualizations in low dimensions :)

        To answer your question directly, yes we can use differential geometry to speed up optimization. As an example, you've probably heard of gradient descent. Preconditioned gradient descent leverages the geometry of the surface to speed up convergence. In the language of differential geometry, if we're optimizing f(x), then x is "contravariant" but grad(f) is "covariant", so technically we can't just add grad(f) to x since they have different types. We first have to multiply grad(f) by a rank-2 tensor (the "preconditioner") that encodes the local curvature of f around x. This technique is used by the Adam optimizer, with the assumption that the preconditioner is diagonal.

  • baruchel 18 minutes ago

    Shameless plug: eight years ago, I created the following website for posting plots of complex functions using similar gradients: https://kettenreihen.wordpress.com/

  • aDyslecticCrow 2 hours ago

    This is brilliant and oddly obvious in hindsight. Measured valuable almost always have noise, and equations rarely solve to true zero. Setting a small delta is common practice, but these graphs show that some equations may have odd behaviour when you do that.

    • willguest an hour ago

      Taking it a step further, how would simple algorithms behave when viewed in this way? Rather that just the outcome, we could observe a possibility space...

      Michael Levin has talked about interesting dynamics with the bubble sort algorithm, which is only a few lines of code, that have parallels in biological processes, suggesting there is a more nuanced logic to nature that we are not seeing

      • bigmadshoe an hour ago

        This sounds a lot like the programs encoded by neural networks.

      • moi2388 an hour ago

        Isn’t that just done in a higher level language, tweaking the algorithm to allow duplicates, and then being surprised there is clustering?

        I mean, I don’t see why that is special? Correct me if I’m wrong. I like his research and views on biological electric spaces, but this I did not understand.

        • willguest 18 minutes ago

          the clustering isn't surprising? are you saying that it is an artefact of the higher level representation? special - perhaps not by itself, but when the same strategy is also expressed by single cell organisms, at least intriguing

  • willguest an hour ago

    My first thought was "how can i do this in 3d and walk around it in VR?"

    I can do the VR part - any chance you can share the algo, so I can get the machine to lift it? I can imagine a 3d graphing tool would need spatialisation in order to be properly appreciated.

    • roywiggins an hour ago

      It's just a matter of subtracting the two functions, taking the absolute value, and putting that number through a color ramp. If you want to see the result in 3D you can subtract the functions and throw that into a 3D graph plotter. Building a 3d surface plotter would be the hard part, but they already exist, eg plug "abs(y/(x^2+y^2) - (x+1)/(x^2+y^2))" in here:

      https://c3d.libretexts.org/CalcPlot3D/index.htmlT

      This viewer also has a "2d" mode that produces a colored 2D plot.

      • willguest 36 minutes ago

        trouble is, i'm more engineer than mathematician, so while i appreciate that this is an entirely solvable problem, assembling it from scratch would likely mean many errors, and less fun

        the 3d plot is nice but not what i would call "spatialised", since it's still a flat render, and I'm exactly thinking about the meshing of the thing. i am familiar with delaunay and marching cube strategies, at least enough to get a machine to hook them up to a spatial plotter

  • fouronnes3 an hour ago

    Very cool! This is also known as signed distance function in computer graphics, or implicit form equations in maths.

  • roywiggins an hour ago

    People who like these types of charts will probably also like domain coloring plots of complex functions:

    https://web.archive.org/web/20120208174423/https://maa.org/p...

    https://observablehq.com/@rreusser/complex-function-plotter

  • clickety_clack an hour ago

    It took me a second to figure out what these are showing because I usually fit plots to data and the “low error” areas are the areas where, if there was a datapoint, it would be in an area where there would be a wide confidence interval, ie low confidence and more likely to be high error in the model.

    The dark areas in the plot seem to be the features driving the shape of the plots. That means that these would be the areas the plotter should be most sure about, otherwise the plot would have a different shape. The bright “low error” areas are the areas where the model seems least likely to be correct.

    I might be missing an interpretation that makes much more sense, but I think “error” might be the wrong terminology to use here. It doesn’t just mean “difference between A and B”, it includes some idea of being a measure of wrongness.

  • arturventura an hour ago

    Is it possible to run this in a chaotic function? I would be interested to see what patterns emerge. I haven't found any code or model to generate this.

  • CGMthrowaway an hour ago

    I don't pretend to understand the method by which the "error == 0 surface" is calculated (do they explain it?).

    But I am curious if these plots can/have been empirically validated with real world data.

    • bigmadshoe an hour ago

      Presumably they just render the absolute error between the lhs and rhs of the equation for every pixel in the plot.

      • calebm an hour ago

        Yep - it's just |left-right|^fuzzyLevel

  • d-us-vb 2 hours ago

    Seems like this is one way of visualizing the solutions to many closely related equations simultaneously. I wonder what the graph looks like if instead coloring based on error, one composited all the solutions within a range of values of of the coefficients.

  • WhyOhWhyQ an hour ago

    Does he say how the fuzzification is defined?

    • calebm an hour ago

      I need to add more details about that. But it's simply: abs(left-right)^fuzzyValue

  • jessep 2 hours ago

    Really beautiful. I bet Ramanujan just “saw” and felt these.

  • oulipo2 2 hours ago

    Isn't that what mathematicians have always done with "level lines"?

    • calebm an hour ago

      I did recently learn of the https://en.wikipedia.org/wiki/Level_set concept, and it is a very similar concept.

      • xico an hour ago

        Those were popular in the 90s for image processing: e.g. https://shape.polymtl.ca/lombaert/levelset/

      • andrewflnr 30 minutes ago

        Dude, it's fine to be learning stuff and even writing about it. But if you're still discovering basic stuff like level sets, then maybe hold off on declaring that you've discovered, after centuries of mathematical development, a completely new form of graphing?

        • ducttapecrown 20 minutes ago

          It reads more like mysticism than a serious claim of novelty, chill out.

          • andrewflnr 9 minutes ago

            > a new type of graphing called "fuzzy graphing"

            > For all the history of computational mathematical visualization, graphing equations has been done in binary mode

            These are very concrete, non-mystical claims. But do you really think "mysticism" is better here?

  • IAmBroom 2 hours ago

    OK, I was expecting some sort of marketing BS at the start, but ... it's geniunely providing a lot more information than the "binary", black-and-whte conventional chart does.

    I'm impressed.