Main page >>>



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

Coordinate descent method of function approximation.

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. (23 kb)

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. (25 kb)

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). (30 kb)
The manual about function approximation, algorithm and methodics.

Interpolation of function by cubic spline. (29 kb)
The manual about function interpolation,

Interpolation of function by canonic polynome. (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 (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 (7 kb)

Program which print itself.

The classic problem of programming. (7 kb)

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. (15 kb)


The well-known russian Tetris game. The special performance is not required. (41 kb)


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. (42 kb)

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. (36 kb)

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. (52 kb)


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

Field line

This program draws the field lines of magnetic dipole like the main Earth's magnetic field. (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. (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. (32 kb)

Borland Pascal 7.0

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


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. (21 kb) (21 kb) (21 kb)

Coloured fractals

The same fractals as above after colour painting. (24 kb) (24 kb) (24 kb)

Koch's curve (fractal)

The program of Koch's curve drawing

Paskal: (21 kb)
C: (37 kb)
About the Koch's curve and the program algorithm

Microsoft Visual Basic 4

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. (562 kb).

Main page >>>

Hosted by uCoz