Here is my programming experiments written in different languages.
They are results of my interest in languages study.
All of programs are distributed according the next license.
You can freely download, copy, disassembe, distribute programs
to your friends. Only a reference to the author is obliged.
If you find the bugs in programs please inform me.
If you look for some special programme or you need help
in programming you can write me
here.

With best regards, author Alexey Petrov aka Gluk.

- Borland C++ 3.1 The distributive download
- Borland Pascal 7.0 The distributive download
- Microsoft Visual Basic 4

Full description. The method of approximation of data by almost any of function with any number of parameters. An example of approximation by gaussian function.

**How to generate random numbers which have
power law distribution?**

A probability density of these numbers is **f(x)~x ^{-a}**.
The method of inverse functions used.
Full description
of the density function building and generation of random numbers for any
type of density function.

**Least squares method of function approximation by polynome.**

This program, using known values of function in N points, finds the coefficients of approximating polynome of power K (K<N).

SqrLess.zip (30 kb)

The manual about function approximation, algorithm and methodics.

**Interpolation of function by cubic spline.**

Spline.zip (29 kb)

The manual about function interpolation,

**Interpolation of function by canonic polynome.**

Can_Poly.zip (29 kb)

The manual about function interpolation,

**Gauss's method to solve system of linear equation.**

This program solves any systems of linear equations using Gauss method

Gauss.zip (28 kb)

About Gauss method, manual

**Searching of prime numbers.**

The program for searching of prime numbers not exceeding the given number. The method of Eratosthene's sieve. The algorithm is simple but requires a lot of memory.

About Eratosthene's sieve and algorithm of program

**Program which print itself.**

The classic problem of programming.

**Arithmetic operation interpretator.**

The interpretator of arithmetic expressions. This program looks through 1.bas file in current catalogue and calculate expression like ((1-3.4*11)*7+(2*23.5))/(-11.1). The number of brackets and "+", "-", "*", "/" signs are limited by computer memory only. The program could be useful for writing the interpretator for any language.

**Tetris**

The well-known russian Tetris game. The special
performance is not required.

**Fox**

The realisation of the Fox algorithm for modelling the countermissile
which have to destroy the missile falling to your city.
Imagine you are George Bush and sitting peacefully in the White House.
And here suddenly not unknown Osama ben Laden starts firing.
What to do?? Screaming "SOS! Help!" is not contemporary according
to such international face of USA. The way is to launch a homing
missile-interceptor. But the enemy is skilful, he can control
the missile by the computer. So - a battle between the cold
"artificial intelligence" of the fox and hot arabic blood.

**Paint 256**

The analogue of well-known Windows Paint program.

The features of the program:

- To read and write bmp files.

- 256-color palette.

- The own simple format pic.

- Open source.

Menus and hot keys:

The menu of the program is at the bottom of the screen. The commands are duplicated by keyboard shortcuts.

- To select file format press TAB or click on (PIC/BMP) menu item.

- Exit - key E or Exit menu item.

- Save file - key S or Save menu item.

- Load file - key L or Load menu item.

**Life - Conway's game**

The old Conway's game of Life. Interface is intuitively understadable.
At the beginning of program print the required field size.

**CF**

The program for formatting C source code according to generally accepted style -
the blocks of program are indented by spaces.

**Field line**

This program draws the field lines of magnetic dipole like the main Earth's magnetic field.

pole.zip (32 kb)

**The motion of charged particle in the radiation belts**

The existence of well-known Earth's radiation belts (Van Allen belts) is the sequence
of the existence of magnetic field. The program shows in graphic way the motion
of charged particle in the field of magnetic dipole.
The illustration of 4th order of Runge-Kutta
method.

dipol.zip (32 kb)

**Particle motion in nearly-gravitational field**

The simple although far from real life demonstration of
4th order of Runge-Kutta
method. The program shows the graphic of motion of massive particle
in the gravitation field where the index of Newton's law of gravity (or Coloumb law of
electrostatic interaction), F ~ 1/r^n is slightly differs of 3.

runge.zip (32 kb)

**Shell**

A very simple file manager like Norton Commander. It can walk through
catalogues. Nothing more.

**Fractals**

This pair of programs can draw on the screen the amazing
self-similar structures. After magnifying the part of that image looks it
like the whole image.

frac_a.zip (21 kb) | frac_b.zip (21 kb) | frac_c.zip (21 kb) |

**Coloured fractals**

The same fractals as above after colour painting.

frac_color_a.zip (24 kb) | frac_color_b.zip (24 kb) | frac_color_c.zip (24 kb) |

**Koch's curve (fractal)**

The program of Koch's curve drawing

Paskal: Koch.zip (21 kb)

C: Koch_c.zip (37 kb)

About the Koch's curve and the program algorithm

**Squares of McMagon**

The name of the game has been taken from the "Game. Game? Game!"
book (in Russian).

The game looks like a traditional mosaic. The aim of game is not to compile
the same picture. There are many solutions of the game's task.
The 24 rectangle cards painted in 3 colours could be combined
side by side if colour of that sides are the same. The goal
of game is to build the rectangle 6*4 that have all outer borders
coloured equally. If you resolve the task, please send me the save of your
solution. I will be grateful but don't promise the award.

Makmagon.zip (562 kb).