Completed the initial brainstorming phase of my visualizer app, and designed (on paper) my hierarchy, tabs, panels, purpose, and functionalities of the entire app. Then I decided on my tech stack (sympy, numpy, scikit potentially, matplotlib, and PyQT5).
It will basically be structured as
Top Tab Bar {
Viewer Tab {
Input Panel (left) {
Functions Input Grid (3x2) (XY1, XY2, Z)
Bounds Controller (a, b, a, inf, or -inf, inf)
Subdivisions Slider (0 to 1000)
Variable of Integration Toggle (dx or dy)
}
Canvas Panel (right) (show the 3D result)
Bottom Tab Bar {
XY-Plane Tab
Cross-Section Tab
3D Shape Tab
}
}
Functions Tab {
Functions Name List
Functions Symbolic Renderer
}
}
State Manager {handle current expressions and variables}
I have decided on my plan to be building the math engine (MVP completed today) -> PyQT Windows with placeholder panels (tomorrow) -> Functions Tab + XY Plane Tab -> Cross Section Tab -> 3D Shape Tab -> Polish -> Ship!!!
Today I built a rough model of the math_engine.py and created a Jupyter notebook to test everything sequentially and in an organized fashion. I’m pretty happy with what I have so far and can’t wait to keep this going!
Also worth noting: THIS BUG TOOK ME SO LONG TO FIX - in parse_xpr(String: expression) which returns a sympy-compatible function I parsed with respect to x, but that x changed for the incoming function and was not the x that I had set up as an sp.Symbol which was already restricted to the real domain. Almost gave me a headache, but the solution was just to change x for locals={“x”: x}
Also I tested everything in the Jupyter notebook for debugging and am so happy with the results precisely matching up with Desmos’ calculated values! Feel free to check out the repo and mess around with values for a and b and expressions 1 and 2 to test out the math engine and report any bugs, please!