The JFX Central Links Of The Week is a great source to discover what is happening in the JavaFX world. One of the projects that caught my eye is JMathAnim, a tool to create mathematical animations built on top of JavaFX. In this interview, David Gutierrez, a mathematician from Spain, walks us through what the project can do and how it came to life.
About David
David Gutierrez is a mathematician who started the JMathAnim project during the COVID lockdown period. By his own admission, he is not a trained developer. He built JMathAnim because he needed a tool that didn't exist in Java yet, and Java was the language he was most comfortable with. He was inspired by Manim, the popular Python library used to create mathematical animations, and decided to build his own equivalent in Java.
His work is a great example of what happens when domain expertise meets just enough programming knowledge: the result is a highly focused, purpose-built tool that does one thing very well. You can follow his work and find examples of his animations on:
About JMathAnim
JMathAnim is a Java library and UI built on JavaFX that lets you create animated mathematical visualizations. The goal is simple: make it easy to build videos that explain mathematical concepts through animation. It's inspired by the kind of content you see on YouTube channels like 3Blue1Brown.
What It Can Do
The library covers a wide range of use cases. You can animate LaTeX-rendered formulas, morphing one expression into another step by step. You can build geometric visualizations, simulate cell growth, generate fractals, and produce videos explaining number theory concepts like base conversion. Everything you see in the animation is defined in code, and the output can be exported directly to a video file, no intermediate steps required.
A particularly nice touch is the built-in code editor, which includes syntax highlighting via RSyntaxTextArea and code completion hints. This makes it accessible to people who want to experiment with the library without setting up a full Java IDE.
Why Ruby in the Code Editor?
One interesting design choice is the use of Ruby as the scripting language inside the built-in editor. The reason isn't mathematical tradition, but it's practical. Ruby's scripting model fits well with the way animation sequences are written, making it a natural fit for the kind of short, expressive scripts you need to define animations. The Java library itself handles all the heavy lifting; Ruby is just the glue layer in the interactive editor.
JavaFX as the Rendering Engine
All rendering in JMathAnim is done on a JavaFX Canvas. LaTeX formula rendering is handled by JLatexMath, and video export relies on JavaCV. The combination gives JMathAnim a capable pipeline from code to finished video.
David is the first to admit that JavaFX had a learning curve, especially since he came at it as a mathematician rather than a developer. But his experience shows that JavaFX is approachable enough that someone without a formal software engineering background can build something genuinely impressive with it.
Explaining Math Visually
One of the most compelling examples shown during the interview is a visualization explaining the conversion from base 10 to base 5. It's a simple concept, but seeing it animated makes it click in a way that a textbook explanation often doesn't. This is exactly the philosophy behind JMathAnim and the channels that inspired it: a well-made animation can communicate in seconds what would take paragraphs to describe in writing.
Links
- JMathAnim:
- Libraries used:
- RSyntaxTextArea: Syntax-highlighting text editor component for Java
- JLatexMath: LaTeX rendering for Java
- JavaCV: Java interface to OpenCV and FFmpeg for video export
- Inspired by:
- Manim: Python library for mathematical animations
- YouTube channel mentioned:
Video content
00:00 Who is David
00:33 Goal of JMathAnim
01:16 Demo of JMathAnim
04:53 Different ways to create animations in the tool
05:40 Why Ruby is used in the code editor
06:24 More demos
07:16 Demos and info on the website
11:12 JavaFX learning curve
13:46 Libraries used in the project
14:30 Example to explain base 10 to base 5 conversion
16:27 Conclusion

Top comments (0)