A Java library to make mathematical animations

JMathAnim is a library written in JAVA to simplify the process of creating mathematical animations. mathematical animations. The current version is 0.9.11.
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 Twitter X BlueSky (mostly in Spanish).
Here you can find some examples made with this library
A basic user’s manual can be found here.
Version 0.9.13-SNAPSHOT (30/10/2025)
stackTo have been replaced by most intuitive stack() series of commands.LaTeXMathObject has been renamed to more Java oriented syntax LatexMathObjectVersion 0.9.12 (09/08/2025)
TwistTransform animation intended to achieve distance-preserving transformsShape.segment to generate segments with a given number of points.LabelTipobjects.Constructibleobjects in TwistAndScale animation.addLengthLabeland addVecLabel static build methods to Delimiterclass that automatically create delimiters with length or vector coordinates that update automatically.Shape.arc(Point A, Point B, double radius, boolean counterClockWise) that draws an arc from A to B with given radius.CameraAlwaysAdjusting when camera gaps were not 0.LatexParser class.Version 0.9.11 (27/04/2024)
LatexStyleclassVersion 0.9.10 (01/11/2023)
Arrow2Dis marked as obsolete now, use new Arrow class instead.TransformMathExpression when grouping glyphs.Version 0.9.9 (16/09/2023)
JoinAnimation or AnimationGroup.randomLayout to locate elements of a MathObjectGroup in random positions.Version 0.9.9-SNAPSHOT (06/07/2023)
PointOwner interface to improve import of Geogebra Point on Object.CTTangentLine class that represents the tangent lines from a point to a circle.Version 0.9.8 (08/04/23)
LogoInterpreter class to create Shape objects from a String of LOGO commands.Version 0.9.7 (09/20/22)
FunctionGraphfor functions with infinity slope at some points.TippableObject and LabelTip classes, allowing more flexibility to animate tippable objects.shrinkOut, growIn and TransformMathExpression.TransformMathExpression.ffmpeg executable. 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 for PointOnFunctionGraph.
Fixed bugs and polished code in ParametricCurve class.
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, CTCircleor
CTIntersectionPoint.
Added Geogebra import capabilities. Some simple Geogebra documents can be imported and converted into Constructible objects.
Added Ray object
Added polygonand polylineimport capabilities for SVG objects.
Now LaTeXMathObject instances are by default compiled using the excellent
JLaTeXMathlibrary, 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.setShowDebugFrameNumbers to 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 merge method for Shape objects.
Added Delimiter.stackTo builder to automatically stack a delimiter to a MathObject
Improved drawing algorithms for FunctionGraph, including adaptative
sampling and continuity check.
Added saveToPNG option to save each frame into a separate png file.
Added support for gradients through JMLinearGradient and
JMRadialGradient classes
Added JMImagePattern class
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 contains method to Shape objects to check if a point lies inside
the Shape.
Added boolean operations union, intersect and substract to Shape
objects.
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
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.
Right now, the library is still in development, so there may be bugs and missing features.
This library uses the following 3rd party libraries:
This project is licensed under the GNU v3 license (https://www.gnu.org/licenses/gpl-3.0.html)