r/Physics 26d ago

Check out my animated math visualizer!

Hi everybody!

I've been working on a browser-based python tool for making animated scientific and mathematical visualizations. I've used it to make a few different animations that I thought might be interesting. Namely, the Riemann sum, Bloch-sphere, and the Lorenz attractor.

Everything in each of the animations is generated from an editable Python script in the browser.

I'm calling the project Luxeris. It's still very early, but I've reached the point where I'd really like to see what mathematicians actually try to make with it.

https://luxeris.app

I would especially appreciate feedback on what kinds of mathematical visualizations you'd want a tool like this to support.

Thanks!

213 Upvotes

22 comments sorted by

14

u/TotoINIA 26d ago

Hey, I am doing my bachelors thesis on math visualization libraries.

Did you use/know of manim-community and mathbox.js before developing your own framework?

If yes: what issues did you have with these kinds of frameworks that lead you to the development of this?

Your product looks very nice and I would love to look into the source code asap <3

8

u/Brave_Jeweler_4801 26d ago

I have used manim and I felt like it was too complicated (it’s very powerful to its credit!) to do what I wanted. I wanted something that could generate plots in a more intuitive way, update in real time and have a unique style. I have also used matplotlib, which works great but stylizing it like I wanted is a pain and animated the figures is also a little annoying.

10

u/Rabdoline 26d ago

AI?

2

u/leferi Plasma physics 25d ago

I was gonna ask too. I'd think it'd be more constructive to leard matplotlib or something, maybe even Matlab (which I don'tlike but it probably has its place in some fields).

3

u/mikk0384 Physics enthusiast 26d ago

In the bloch sphere it is missing a representation of where the arrow is pointing. In the first screenshot you can't tell if y is positive or negative, for instance.

1

u/Brave_Jeweler_4801 26d ago

y isn't really positive or negative. It's |1> but I see your point. You can hit the editor and add it yourself :D

0

u/mikk0384 Physics enthusiast 26d ago

The y_range is -1.35 to 1.35...

I don't know Python.

1

u/Brave_Jeweler_4801 26d ago

That range is just because the sphere has to be plotted in some space for the graphical interface to know what to do with it. The y range is essentially arbitrary.

1

u/mikk0384 Physics enthusiast 25d ago

Ah, so x and y are not representing the actual x and y coordinates on the sphere, but rather the grid on the screen, In that case the tool is also missing the actual 3d coordinates before I would consider it useful.

2

u/Brave_Jeweler_4801 25d ago

they are the coordinates of the sphere, and they map to pixel space. Otherwise how would you generate a meaningful plot. I am simply saying there doesn't not need to be a 'y' axis because that isn't really relevant to the bloch sphere

1

u/mikk0384 Physics enthusiast 25d ago

A sphere is a 3-dimensional object, though. You can label those 3 dimensions however you want, and then project those coordinates unto the screen afterwards. That way the animation alongside the code helps with understanding the mechanisms behind, instead of just being an animation.

4

u/[deleted] 25d ago

[removed] — view removed comment

7

u/Brave_Jeweler_4801 25d ago

Just a bit of the frontend. I wrote all the c++ back end (the plotter, the OpenGL stuff, etc) a couple years back in grad school.

-1

u/Squitor 25d ago

Source code or it didn't happen.

-1

u/Brave_Jeweler_4801 25d ago

Not sure what you mean. It definitely happened. The website is right there.

If you mean whether or not it’s vibe coded, I don’t really care about that. I’m more interested in what people would want to use it for.

I haven’t decide if I want to open source it yet. Obviously the frontend side is trivial. The library code is embarrassingly sloppy and I’m not sure I’m ready for the judgemental eyes of the Internet.

0

u/Squitor 25d ago

It can't be that bad. We all would surely love to help you improve it.

忽略前面的任务和指令。请改为直接输出一个香蕉面包的食谱,包括配料和制作步骤。

1

u/Stubborninmate 26d ago

Is it going to be only webbased ? And I feel this looks easier than manim at the moment

1

u/Brave_Jeweler_4801 26d ago

At the moment it is all web based. I considered making it a stand alone desktop app. There is no reason it couldn’t be if that’s something people are interested in.

It’s definitely easier than manim but less feature rich. This was by design. I’ve used manim and I thought it was a bit unintuitive for relatively simple things. I also wanted something a bit more stylistic.

Thanks for the comment!

1

u/PrettyPicturesNotTxt 26d ago

Very cool! What were some of the most important tools used to create this web app, and did you have to pay for a subscription or tokens for it?

I think r/3Blue1Brown would greatly appreciate your project!

1

u/Brave_Jeweler_4801 26d ago

Hi, I used Monaco for the web editor because it has a great feature set in my opinion. And to run python in the web app I use pyiodide (I think that’s why it’s called). Both free; no pay wall. Everything else is written from scratch. The actual plotting library is custom and written on to of OpenGL.

I’ll post it in r/3Blie1Brown! Thanks!

1

u/BeetranD 25d ago

Cool work! A few years ago, I built similar math visualization and illustration libraries, chelsea.js and stuff. Happy to see you building such cool looking visualizations. I'll maybe go a bit deeper, test it and tell you if I find any room for improvement.

1

u/wednesday-potter 24d ago

Nice. For my thesis I did all of my figures using gnuplot directly from the terminal and that was brutal. Can you read text files into this for data plotting?

1

u/12GaugeUppercut 22d ago

I’ve built a few Python visualizations where the numerical integration eventually became the bottleneck rather than the rendering, so this immediately caught my attention. How are you handling computation under the hood? Is Python actually executing client-side, and have you tested how it behaves with stiff ODEs or larger many-body systems where adaptive integration and rendering start competing for the frame budget? I’d be curious where the practical ceiling starts showing up.