Sun Tzŭ multiplication & division animations (Mathematica)
See <https://github.com/yawnoc/sun-tzu-arithmetic>,
which consists of crappy Mathematica code for the animations in my
translation of Sun Tzŭ's Computational Classic,
in particular Vol. I §8 & §13 (multiplcation)
and §9 & §14 (division).
-
Change to the directory of
SunTzu.wl
.
-
Load the package by running
<< SunTzu`
.
-
Run the following:
Multiplication
{
{81, 81},
{1989, 64},
{1024, 1024},
{246, 97531}
} /.
{x_, y_} :> MultiplyAnimation[x, y, Export -> True]
81 \times 81 = 6561 |
1989 \times 64 = 127296 |
1024 \times 1024 = 1048576 |
246 \times 97531 = 23992626 |
|
|
|
|
Division
{
{100, 6},
{1989, 64},
{6561, 9},
{97531, 4}
} /.
{x_, y_} :> DivideAnimation[x, y, Export -> True]
100 \div 6 = 16 + \dfrac{4}{6} |
1989 \div 64 = 31 + \dfrac{5}{64} |
6561 \div 9 = 729 |
97531 \div 4 = 24382 + \dfrac{3}{4} |
|
|
|
|