Drawing Modular multiplication circle, triangle and square using Python.
The code: modular_mult_shapes.py
The code uses tkinter to show the image in real time, tkinter comes buld in with a CPython install. It also uses the PIL or Pillow library to export the image as PNG file, Pillow (PIL) is a seperate install.
Pillow: https://pypi.org/project/pillow/
The code needs the seperate font file FreeMono.ttf to be present in the same folder. It is used to put text on the exported image.
Found on the web: "A modular multiplication circle is a visualization that uses a circle to represent numbers in a specific modulus and draws lines to connect points based on a multiplication pattern. "
This Python code draws modular multiplication circles, triangles and squares, it has two sliders to adjust the values of the m and p parameters. The colors can be changed. The image can be exported to a PNG file with a right mouse click.
Some examples:
Drawing Modular multiplication circles using Python
This Python code draws modular multiplication circles, it has two sliders to adjust the values of the m and p parameters. The image can be exported to a PNG file with a right mouse click.
The code: mod_mult_circle_v5.py
The code uses tkinter to show the image in real time, tkinter comes buld in with a CPython install. It also uses the PIL or Pillow library to export the image as PNG file, Pillow (PIL) is a seperate install.
Pillow: https://pypi.org/project/pillow/
The code needs the seperate font file FreeMono.ttf to be present in the same folder. It is used to put text on the exported image.
Some examples:
A variant maps the points on a square iso. circle:
The code: mod_mult_square.py
Mapping the points on a triangle.
The code: mod_mult_triangle.py












