This isn’t a question that is particularly related to Unity, but a discussion on how to create a 3D graphing calculator. I have been trying to tackle this problem for a few days, and it seems the algorithms are beyond me.
I managed to simplify and evaluate algebraic equations from strings using other peoples libraries.
My method takes about 2 minutes to get all the data points for the mesh. Not all points are calculated by the library, and some points shouldn’t exist. I rounded the data points to the interval they were parsed through, and added these to a dictionary so that next when I used marching cubes algorithm, I could quickly check if a z value existed at the corner. (umm IDK if I lost values because of floating point precision, I did round the keys down, but I also drew out gizmos which visually matched the mesh.)
I managed to get the shape, with holes in it, and I am not satisfied with this one bit. The shape is larger on the negative side than on the positive side. Nonetheless, this got a fairly close shape to what I wanted and wasn’t complete gibberish.
So, can someone help me break down the problem so that I can quickly generate a seamless mesh, similar to how commercial 3D graphing calculators do it?
I like to post videos of stuff on my youtube channel with WARNING random music
, anyway here is what I managed …and it is not pretty.


