Nathan Tiggemann

Coding

Plotting tropical curves

You can find a Python script for plotting tropical curves defined by a tropical polynomial here. The same script, but as a .exe file can be found here. The script also plots the dual subdivision and can plot the tikz code for the figures.
It uses the packages numpy, matplotlib and tkinter.
If you are on Windows, you can just download the exe-version and are ready to go. Short notes on how to use the program: For more details on how to make this script work, what the options do, which inputs are allowed and how to configure default values, see here.

Plotting tropical hypersurfaces in three dimensions

You can find a Python script for plotting tropical hypersurfaces in \(\mathbb{R}^3\) here. An even easier-to-use program written by Lars Allermann can be found here.
My script, however, does plot the edges of the dual subdivision, too. There is no support for min-convention yet and you have to do the input directly in the file. Running it will immediately show you the plots. This script uses the packages numpy, matplotlib and scipy.
For more details on how to make this script work and how the input works, see here.

Disclaimer

Use all the scripts on this website at your own risk. I am confident that they work very well for reasonable input, however, I do not guarantee that all outputs are correct. If you find any bugs, please contact me. I only learned Python to write these scripts, so don't be surprised if my codes might not be the most elegant or efficient ones ever written.

On plotting tropical curves

How to install Python and necessary packages

I use Windows, so here is how it worked for me: Download Python from the official website. Install it - AND make sure that you pick the "Add Python to PATH" during the installation.
Download pip with the command "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py" in the command prompt (You find that by pressing the Windows key and then typing cmd. The "" are not part of the command). Install pip with the command "python get-pip.py". Use the commands "pip install numpy", "pip install matplotlib" to install the two packages. "math", "re" and "tkinter" are pre-installed.
If you use Linux or macOS: Ask chatGPT how to install everything. You might need to install "tkinter" explicitly, too.

The options

Input

Some remarks about the input

Change default values

If you open the file in your favorite editor, you will immediately see a comment that reads "#Default values". Change the variables underneath to the values to the default values you want.

The algorithm

The idea is the following:

Why I wrote this script

There are already existing programs to plot tropical curves. And they are probably faster, more elegant, and use only algebraic methods. My motivations for writing this script were mostly the following two: Writing it was fun and it is easy to use. This is also why I tried to keep all explanations very low level.

On plotting tropical hypersurfaces in three dimensions

How to install Python and necessary packages

I use Windows, so here is how it worked for me: Download Python from the official website. Install it - and make sure that you pick the "Add Python to PATH" during the installation.
Download pip with the command "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py" in the command prompt (You find that by pressing the Windows key and then typing cmd. The "" are not part of the command). Install pip with the command "python get-pip.py". Use the commands "pip install numpy", "pip install matplotlib", "pip install scipy" to install the three packages. "math", "re" and "tkinter" are pre-installed.
If you use Linux or macOS: Ask chatGPT how to install everything. You might need to install "tkinter" explicitly, too.

Input

For this script, you have to manually adjust the input in the code. If you open the file, after line 15 (''' INPUT ''') there are more explanations on how to do this.

The algorithm

The idea, similarly to the two-dimensional case, is: Obviously, there are quite a few details I skipped here.

Why I wrote this script

There are already existing programs to plot tropical hypersurfaces. And they are probably faster, more elegant, and use only algebraic methods. My motivations for writing this script were mostly the following two: Writing it was fun and it is easy to use (This is also why I tried to keep all explanations very low level.). At the time I didn't know the program by Lars Allermann. Still, plotting the dual is an advantage my script has.

How to get a website like this

Website Hosting

This website is hosted on GitHub. Here is a good reference on how to start your own website. Thanks to Thomas Brazelton for this hint!

Writing the HTML code

Here is the obvious hint: Describe to chatGPT how you want your website to look and the structure to be and ask it to give you the HTML code. This works incredibly well.