general_python_programming/readme.md
2019-12-24 09:51:08 +00:00

68 lines
2.9 KiB
Markdown

HIJ FONG !
==========
Background: Chaos Mathematics
-----------------------------
This game is based on chaos mathematics.
Back in the 1980's a computer scientist/mathematician
Benort Mandelbrot discovered some maths functions that
behaved in very stange ways. Instead of smoothly changing
they became chaotic and unpredictable.
This facinated the IBM scientist (who incidentally, was also paid by his employer to
go up in planes and observe another chaotic phenomenem, the random shapes of clouds).
Natural Chaos: Nature will find a way
-------------------------------------
The film Jurasic park features a chaos mathmetician brought in to
look at the park and decide whether it was safe or not.
He conclusded it was not. Nature would find a way to adapt, and
what they had done at the park was introduce a life form. Life forms can
adapt and change. He reasoned that the dinosaurs in the park, would adapt, and
later escape from the island causing a disaster!
As we know from the film, this did not take long!
Another example of chaos in nature was the spraying of crops by DDT
in the 1950's and 60's. At first all the insects died off and the farmers
had far better crop yields (but also poisoned all the fish in the rivers and killed many wild birds).
But, a tiny proportion of the insects, through the natural chaos
of DNA mutation, because resistant. This tiny proportion that could cope with DDT, having no competition
with other insects,
grew in population rapidly and after a few years caused worse crop yields than before DDT
was introduced. Anyone interested in this should read "silent spring" by "rachel carson"
written in 1962.
How to play
-----------
The program featured here starts with a blank tk graphics window. By clicking the mouse
the chaotic function is revealed. Where in a stable zone the pixel is black.
In a very chaotic zone the pixel is white. In a zone near the stable zone
the pixel will be grey. Very near the ragged edge of the stable zone
pixels will be coloured.
The aim of the game is to find a pixel in the middle of the chaotic and
the stable zone.
Once this is clicked on the entire shape, previously hidden, is drawn in full on the screen.
Enjoy the chaos!
For Maths people
----------------
This game secretly rotates and resizes the hidden mandelbrot shape.
It does this using complex numbers which naturally have an angle of rotation
and a sizing factor associated with them.
Complex numbers are a pair of numbers, one real, the type of number
we use every day, and a stranger one, an imaginary one.
The imaginary one when multiplied by itsself becaomes a real number but minus!
Most maths people use the term 'i' to denote a number if imaginary,
but people who live in the real world, like electronic engineers
(and python programmers) use 'j'.
In fact, most 3D games now used a 4 dimiensional version of complex numbers
called quaternions to rotate objects in the computer for you to shoot at!