r/JavaFX • u/FrankCodeWriter • Jun 25 '26
Cool Project JMathAnim: a JavaFX library and UI to create mathematical animations (interview with the creator)
I interviewed David Gutierrez, a Spanish mathematician who built JMathAnim during the COVID lockdowns. He's not a trained developer, which makes this project even more interesting. He needed a tool that didn't exist in Java, knew Java well enough, and just... built it.
JMathAnim is inspired by Manim (the Python library behind a lot of 3Blue1Brown-style content) and lets you create animated math visualizations entirely in code. You can animate LaTeX formulas morphing step by step, build geometric visualizations, generate fractals, simulate cell growth, and export everything directly to video. No intermediate steps.
Under the hood, it uses a JavaFX Canvas for rendering, JLatexMath for the LaTeX side, and JavaCV for video export. There's also a built-in code editor with syntax highlighting via RSyntaxTextArea, which makes it accessible without needing a full IDE setup.
One design choice that surprised me: the interactive editor uses Ruby as the scripting language, not Java. Practical decision, it fits well with the short expressive scripts you write to define animation sequences.
David's own admission is that JavaFX had a learning curve for him. But the result speaks for itself. The base-10 to base-5 conversion example in the video is a good demo of what this kind of tool can do for education.
Video + write-up: https://webtechie.be/post/javafx-in-action-%2327-with-david-gutierrez-about-jmathanim-to-create-mathematical-animations/
Source code is on Codeberg: https://codeberg.org/davidgutierrezrubio/jmathanim
3
u/hadet47530 Jun 25 '26
Neat! It's a mix of JavaFX and Swing. They can work well together. Recently I tested out using JavaFX properties with Swing controls. Works!
3
u/sedj601 Jun 25 '26
This is very neat, but is it a new rendition of Processing? Processing took this kind of stuff on long ago. It's still out there, but it appears to be web focused today.
2
u/Distinct_Meringue_76 Jun 25 '26
That's a great project. Can't wait to try it out
2
u/Fuzzy-System8568 Jul 06 '26
The thing that always annoyed me about manim was math animations are inherently type dependant... but they chose python, the language known for its weak typing...
I always dreamed of a java equivalent.
My only critique is I honstly tried looking at the codebase to help contribute... yeah... theres a lot of cursed code in there that makes it difficult to pick up and help with.
Imho big projects like this need to be a little cleaner, to encourage other contributors more.