
JMathAnim is both a standalone executable and a library written in JAVA to simplify the process of creating mathematical animations. mathematical animations. The current version is 0.9.13.
If you use it and find a bug/missing feature, feel free to fill an issue here. For any other questions, you can contact me at davidgutierrezrubio@gmail.com.
You can also follow my Youtube channel here where I occasionally upload math videos (spanish with english subtitles) using this library, and my BlueSky (mostly in Spanish).
Gallery
Here you can find some examples made with this library
Manual
A basic user's manual can be found here.
What's new?
Version 0.9.13 (07/12/2025) * Now JMathAnim can be used as a Java library and a Groovy standalone interpreter (you can download versions for Windows and Linux in the releases section).
-
Improved SVG import capabilities.
-
Improved compatibility of standalone Groovy execution in Linux/Windows
-
Beta version of SVG export.
-
Changed logging system from LogBack to System.Logger
-
Improved logging system
-
Improved Groovy code execution.
-
Added maven directives to generate a "fat jar" to use as Groovy executor.
-
Big rewriting of code updating system to improve efficiency.
-
Changed class structure to use generics.
-
Several syntax changes, which may get incompatibility with previous
-
versions.
-
Commands
stackTohave been replaced by most intuitivestack()series of commands. -
LaTeXMathObjecthas been renamed to more Java oriented syntaxLatexMathObject -
Improved Geogebra import.
Version 0.9.12 (09/08/2025)
- Project moved from OSSRH to Maven Central. See here to update your maven file
- Added
TwistTransformanimation intended to achieve distance-preserving transforms - Added optional parameter for
Shape.segmentto generate segments with a given number of points. - Improved arc/circle Shape creation.
- Improved handling of
LabelTipobjects. - Fixed bugs for
Constructibleobjects inTwistAndScaleanimation. - Added
addLengthLabelandaddVecLabelstatic build methods toDelimiterclass that automatically create delimiters with length or vector coordinates that update automatically. - Added
Shape.arc(Point A, Point B, double radius, boolean counterClockWise)that draws an arc from A to B with given radius. - Added arc SVG import capabilities.
- Fixed bugs importing SVG.
- Fixed a bug for updater
CameraAlwaysAdjustingwhen camera gaps were not 0. - Added support for ligatures in
LatexParserclass.
Version 0.9.11 (27/04/2024)
- Added automatic coloring capabilities to LaTeX formulas, using the
LatexStyleclass - Improved handling of zero-time animations
- Many, many bug fixes.
Version 0.9.10 (01/11/2023)
- Arrow class rewritten from scratch, old class
Arrow2Dis marked as obsolete now, use newArrowclass instead. - Logo interpreter now admits nested REPEAT commands.
- Improved handling of
TransformMathExpressionwhen grouping glyphs. - Lots of bug fixes.
Version 0.9.9 (16/09/2023)
- Improved handling of animations to work better with containers like
JoinAnimationorAnimationGroup. - Added
randomLayoutto locate elements of aMathObjectGroupin random positions.
Version 0.9.9-SNAPSHOT (06/07/2023)
- Added
PointOwnerinterface to improve import of Geogebra Point on Object. - Added
CTTangentLineclass that represents the tangent lines from a point to a circle.
Version 0.9.8 (08/04/23)
- Added
LogoInterpreterclass to createShapeobjects from a String of LOGO commands. - Improved handling of delay effect for animations.
Version 0.9.7 (09/20/22)
- Improved drawing algorithm in
FunctionGraphfor functions with infinity slope at some points. - Rewritten
TippableObjectandLabelTipclasses, allowing more flexibility to animate tippable objects. - Added horizontal, vertical and both scaling capabilities to
shrinkOut,growInandTransformMathExpression. - Fixed bug where default adding animation was not used in
TransformMathExpression. - Improved workaround for JavaFX bug that displays artifacts when drawing cubic lines when control points are equal to vertices.
- Sounds are here! Added the possibility of including sounds in the
animations, using an external
ffmpegexecutable. You can find a brief tutorial in the advanced topics section of the user manual.
Version 0.9.6 (03/06/22)
-
Removed thickness from arrow heads.
-
Added
saveImage(filename)to save still frames into a image file. -
JMImageobjects now can be transformed using any affine transformation. -
Updated to JavaFX 18
-
Fixed annoying bug that prevented JavaFX to properly draw cubic curves when control points matched destiny point
-
Removed extra frame that appeared at the end of an animation.
-
Implemented proper
copy()method forPointOnFunctionGraph. -
Fixed bugs and polished code in
ParametricCurveclass.
Version 0.9.5 (23/03/2022)
-
Added first version of
CrossMathElementsanimation, that can be used to cross single or multiple elements of a formula. -
Update levels are now computed at creation time, increasing the performance.
-
Added Constructible objects, like
CTLine,CTCircleorCTIntersectionPoint. -
Added Geogebra import capabilities. Some simple Geogebra documents can be imported and converted into Constructible objects.
-
Added
Rayobject -
Added
polygonandpolylineimport capabilities for SVG objects. -
Now
LaTeXMathObjectinstances are by default compiled using the excellentJLaTeXMathlibrary, making it considerably faster and removing the need to install a LaTeX distribution.
Version 0.9.4 released (26/12/2021)
-
Added configuration flag
config.setShowDebugFrameNumbersto superimpose frame number on animation. -
Improved implementation of delimiters. Now they are proper Shape objects instead of pure fill objects .
-
Labels now can be easily added to delimiters with the method .setLabel.
-
Improved handling of thickness property.
-
SVG import now properly handles thickness and transform attributes.
-
Fixed a bug that prevented properly styling sliced MultiShapeObjects or LaTexMathObjects.
Version 0.9.3:
-
Added ContourHighlight animation.
-
Fixed a bug in
reversemethod when applied to paths with both curved and straight parts. -
Improved
mergemethod forShapeobjects. -
Added Delimiter.stackTo builder to automatically stack a delimiter to a MathObject
-
Improved drawing algorithms for
FunctionGraph, including adaptative sampling and continuity check. -
Added
saveToPNGoption to save each frame into a separate png file. -
Added support for gradients through
JMLinearGradientandJMRadialGradientclasses -
Added
JMImagePatternclass
Version 0.9.2:
-
Added lambda functions to add effects to animations
-
Added ComposeLayout for MathObjectGroup objects
Version 0.9.1:
-
Fixed bug in boolean operation union
-
Fixed bug loading internal resources
Version 0.9.0:
-
Fixed bug loading styles from SVG objects, including LaTeXMathObject
-
Added reset() method to the JMathAnimScene class
-
Added effects to transform animations
-
Added
containsmethod toShapeobjects to check if a point lies inside theShape. -
Added boolean operations
union,intersectandsubstracttoShapeobjects. -
Added updateable
BooleanShape. # Prerequisites A machine with JDK 1.8 installed. A Java IDE like Netbeans or Eclipse is recommended.
Currently, the library is tested on
-
Windows 11 with Apache Netbeans 12.1 and Oracle JDK 1.8.0_261
-
LUbuntu 20.04, with Apache Netbeans 12.1 and openjdk 11.0.7
Installing
This library is Maven based, which means it is very easy, using a modern Java IDE, to create a project that automatically downloads all needed dependencies to run your animations. A detailed step-by-step tutorial to create a project that uses JMathAnim is detailed here. You need a Java virtual machine with version 11 or higher to run JMathAnim.
Limitations
This library is under continuous development, so there may be bugs or missing features. I'm developing it in my spare time as a hobby, with the hope of helping others create resources for math education.
Dependencies
This library uses the following 3rd party libraries:
- JavaFX For the graphics part.
- Xuggler For creating videos.
- JLaTeXMath For creating the LaTeX texts and mathematical expressions.
License
This project is licensed under the GNU v3 license (https://www.gnu.org/licenses/gpl-3.0.html)