Skip to content

oonap0oo/Modular-multiplication-circle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modular multiplication

Modular multiplication circle, triangle and square

Drawing Modular multiplication circle, triangle and square using Python.

modular_mult_shapes_screenshot.png

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:

mod_mult_circle_424_78.png

mod_mult_circle_436_111.png

Older versions:

Modular multiplication circle

Drawing Modular multiplication circles using Python

mod_mult_circle_v5_screenshot.png

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:

mod_mult_circle11.png

mod_mult_circle4.png

mod_mult_circle5.png

Modular multiplication square

A variant maps the points on a square iso. circle:

The code: mod_mult_square.py

mod_mult_square_368_53.png

mod_mult_square_364_105.png

Modular multiplication triangle

Mapping the points on a triangle.

The code: mod_mult_triangle.py

mod_mult_triangle_436_330.png

mod_mult_triangle_488_328.png

mod_mult_triangle_524_351.png

mod_mult_triangle_544_218.png

About

Drawing Modular multiplication circles using Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages