Old and new apps, via modern coding agents by Terry Tao
Reviving and Creating Mathematical Applets with AI
By Terence Tao | Published July 11, 2026
Since 1999, I have been exploring the intersection of mathematics and machine-assisted instruction. During that era, I developed several applets using Java 1.0 to support my courses in linear algebra and complex analysis, as well as to visualize complex mathematical structures.
The Evolution of Visual Aids
My early efforts focused on visualizing objects such as:
- Honeycombs
- Besicovitch sets
- Various linear algebra concepts
While these tools were effective, the manual programming process was efficient incredibly time-consuming. Eventually, as web standards evolved, support for these legacy Java versions vanished, rendering my applets non-functional.
The Migration Process
Recently, I began moving my blog and webpage data into a more sustainable repository. I decided to use modern AI coding agents to handle the transition. I tasked the agent with porting the legacy code to Javascript.
The results were impressive: the porting took only a few hours. Not only are the applets working again, but some received visual upgrades. For example, the Besicovitch set visualization has evolved from its original monochrome state to a colorized version.
Quality Control and "Vibe Coding"
I was particularly satisfied with the restoration of the honeycomb applet, a project I co-authored with Allen Knutson in 1999, which was notoriously difficult to code by hand.
Regarding the reliability of LLM-generated code, there is a known tendency for agents to introduce bugs. However, in this batch of roughly two dozen applets, the results were a "net wash":
| Source of Bug | Description | Frequency |
|---|---|---|
| AI Agent | A minor issue with drag events in a complex analysis applet when moving the cursor outside the box. | 1 |
| Original Code | Logic errors in the 1999 Java source that I was previously unaware of. | 2 |
"As these applets are meant to be secondary visual aids rather than critical components of a mathematical argument, the downside risk of such bugs is relatively low."
Expanding the Toolkit: New Applications
The ease of this process encouraged me to attempt projects that were previously too complex to finish.
1. Special Relativity Visualization
In 1999, I envisioned a tool for special relativity—essentially a version of Inkscape designed for Minkowski space, defined by the metric:
I attempted to write this in Java, but the complexity forced me to abandon it. After a few hours of what I call "vibe coding" with an AI agent, I finally realized this vision.
Current Status of the Relativity App:
- Core Minkowski space logic implemented
- Basic visualization functional
- Iron out "alpha" version bugs
- Incorporate user feedback
2. The Gilbreath Conjecture
Following a recent blog post on the Gilbreath conjecture, I used an AI agent to quickly build a corresponding visualization tool. This process was similarly painless and took only a few hours of iterative conversation.
Final Reflections
The workflow for generating these tools can be summarized as follows:
def create_math_app(concept):
prompt = f"Create an interactive visualization for {concept}"
code = ai_agent.generate(prompt)
while bugs_found(code):
code = ai_agent.fix(bugs_found(code))
return code
I believe that providing interactive supplements for future papers is a viable strategy. Since these tools support rather than prove the core mathematical arguments, the risk associated with LLM-generated code is acceptable.
Visual References from the Project:
Example of data visualization.
Interface snapshot 1.
Interface snapshot 2.
Interface snapshot 3.