logo

JMathAnim is both a standalone editor and a library written in JAVA to simplify the process of creating mathematical animations. It is designed with math educators in mind: thanks to the editor's snippets and visual tools, you can produce professional-looking animations for your lessons with very little programming.

windowPreview

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

The user's manual is organized as a learning path, designed so that math educators with little or no programming experience can go from zero to their first animation in an afternoon:

Cookbook

You can find a cookbook with some useful recipes here (It is still under construction)

What's new?

Version 1.9.6 (03/09/2026)

This release updates from Java 11 to Java 17 to use latest versions of dependencies, fix bugs affecting overall performance, adds method completions to the editor and a preliminary implementation of camera rotation.

You can see the full list of changes here.

Version 1.9.5 (22/08/2026)

This release brings plugins to the editor, a unified syntax across the whole DSL layer and compound objects that carry a state of their own. It also fixes a loooong list of bugs in animations, SVG export and the internal objects.

  • Last version using Java 11. Next version will use Java 17.
  • Added plugin support: plugins are loaded and unloaded from the menu, are associated to a project and loaded with it, and can bring their own snippets
  • Big refactor of the DSL layer: every definition now shares the same parser and the same syntax
  • Moved the autocompletion and snippet catalogues to the core
  • Added DSL definitions for compound objects
  • Added discrete state variables to compound objects, and a methods parameter to extend them with your own code
  • Added the defaults and temporarily closure blocks
  • animJoin and animGroup now accept both DSL blocks and closures
  • Added DSL definitions for board, config, camera, affine transforms, images, scalars, sounds and wait animations
  • Added Delaunay and Voronoi DSL definitions, with their autocompletions and snippets
  • Added the JMA class, which gives access to the DSL from inside a class defined in a script
  • Added the parts parameter to the DSL definitions that accept sub-objects
  • Added baseline information for LaTeX objects compiled with JLatexMath, plus BASELINE anchors and alignment
  • Added toSVGPath() and a codec that stores shapes as compressed text
  • Added getArea() and getLength() to any Pathable object, and getHoldCoordinates to the constructible objects
  • Visible is no longer a drawing style: it belongs to the drawable itself and is not transferred by copy()
  • Big refactor of Animation and its subclasses, with a clearer contract for the containers and a correct exit when an animation is stopped halfway
  • Improved internal objects (labels and marks): they are updated properly, copied with their owner and animated by ShowCreation
  • CartesianGrid and PolarGrid are now built from segments instead of lines
  • Axes can now show only one of the two axes
  • Editor: a script error marks the failing line in the gutter, links to it from the log window and leaves the cursor where it was
  • Editor: the snippet sidebar is resizable, searches by description and block name, and orders the suggestions by how often they are used
  • Editor: dragging an image into the script inserts the DSL code for it
  • Editor: added line wrap and accelerators for the find and replace dialogs
  • Added the cheatsheet in Typst format
  • Fixed a JavaFXRenderer bug that took a frame for unchanged when it had the same number of objects as the previous one
  • Fixed several bugs in SVG export: empty bounding boxes, missing dash information and decimal separators taken from the locale
  • Fixed bugs in AnimationGroup with children of different runtimes, in Trail for very short animations, and in the rendering of closed paths
  • My birthday! Bug where year counter is increased still left unfixed...

Version 1.9.4 (24/07/2026) This release fixes performance issues in the core, a memory leak in the GUI and add some features related Groovy scripting. The project, which started as a Java library and later also as a Groovy scripting frontend is progressively bringing more support for language in DSL blocks that allow more intuitive reading and fast autocomplete via ctrl+space or snippets.

Version 1.9.0 (19/06/2026)

  • Added snippet bar to add common DSL definitions and properties
  • Added project support
  • Added DSL definitions for animations
  • Fixed bug that prevented label objects to be scaled/rotated
  • Added play.moveTo shortcut
  • Added Commands.affineTransform for an arbitrary AffineJTransform animation
  • Added overloaded methods to accept generic Collection of MathObject for animations in Commands apart from varargs

Version 1.7.0 (25/03/2026)

  • Changed execution to Launcher.java which allows dynamic updating of JMathAnim core
  • "About" windows has now an update button that allows to download and use newer core versions
  • Added drag&drop for ggb, jpg, png, bmp and svg files, generating proper import commands
  • Added sounds are now played in preview window
  • Added API reference in help menu
  • Fixed bugs in Constructible objects
  • Added scene.pause() method to pause animation in gui mode
  • Added Angle Geogebra import to CTAngleMark object

Version 1.6.0 (14/03/2026)

  • Happy pi day!
  • Improved performance in javafxrenderer
  • Added new JMathAnim themes: solarized dark/light, blackboard and blueprint
  • Improved autocompletion
  • Added DSL definitions to help create objects

Version 1.5.0 (02/03/2026)

  • Added a LaTeX Transform Editor to help easily generate animations between LaTeX formulas.
  • Improved autocomplete.
  • Added solarized dark/light themes to the editor.
  • Added shortcut editor.
  • LaTeX preview is more resizable now.

Version 1.4.0 (24/02/2026)

  • Added Color editor
  • Added SVG export in menu for generated scenes
  • Bug fixes and GUI improvements

Version 1.3.0 (21/02/2026)

  • Added Mac Os installer
  • Improved autocompletion
  • Added color edition in the LaTeX preview dialog
  • Added LaTeX style editor
  • Preview window can now be resized

Version 1.2.0 (14/02/2026)

  • This version brings some improvements to the editor, mostly in the autocomplete and formatting methods
  • Adjusted threshold to prevent JavaFX bug when drawing degenerate Bézier curves
  • Stripped unused JavaFX libraries from the Windows installer

Version 1.1.0 (09/02/2026)

  • Fixed some minor bugs
  • Added LaTexPreview dialog

Version 1.0.0 (04/02/2026)

  • After almost 6 years of slow but constant development, version 1.0.0 is here!
  • JMathAnim now is composed of 2 separate projects: jmathanim-core, with the library and the groovy parser, and jmathanim-gui, a GUI interface to edit and run animations.

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 an image file.

  • JMImageobjects now can be transformed using any affine transformation.

  • Updated to JavaFX 17

  • 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.

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

The easiest way to use JMathAnim is the standalone editor: just download the installer for your operating system from the releases page and follow the editor tutorial. No Java knowledge required.

Alternatively, the 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.md)