logo

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 stackTo have been replaced by most intuitive stack() series of commands.

  • LaTeXMathObject has been renamed to more Java oriented syntax LatexMathObject

  • 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 TwistTransform animation intended to achieve distance-preserving transforms
  • Added optional parameter for Shape.segment to generate segments with a given number of points.
  • Improved arc/circle Shape creation.
  • Improved handling of LabelTipobjects.
  • Fixed bugs for Constructibleobjects in TwistAndScale animation.
  • Added addLengthLabeland addVecLabel static build methods to Delimiterclass 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 CameraAlwaysAdjusting when camera gaps were not 0.
  • Added support for ligatures in LatexParser class.

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 new Arrow class instead.
  • Logo interpreter now admits nested REPEAT commands.
  • Improved handling of TransformMathExpression when grouping glyphs.
  • Lots of bug fixes.

Version 0.9.9 (16/09/2023)

  • Improved handling of animations to work better with containers like JoinAnimation or AnimationGroup.
  • Added randomLayout to locate elements of a MathObjectGroup in random positions.

Version 0.9.9-SNAPSHOT (06/07/2023)

  • Added PointOwner interface to improve import of Geogebra Point on Object.
  • Added CTTangentLine class that represents the tangent lines from a point to a circle.

Version 0.9.8 (08/04/23)

  • Added LogoInterpreter class to create Shape objects 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 TippableObject and LabelTip classes, allowing more flexibility to animate tippable objects.
  • Added horizontal, vertical and both scaling capabilities to shrinkOut, growIn and TransformMathExpression.
  • 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 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

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)