Projects in Visual C++

Zhou Ji

Simulation of biofilm growth

Introduction

A biofilm is a bacterial community of immobilized cells attached to a surface - the substratum - often in an aquatic eenvironment. They occur in a large variety of physical situations with much human interests. Biofilm can lead to increases in friction and heat transfer resistance. They can cause material deterioration through microbial corrosion, and they can contaminate artificial organs and catheters. The understanding of biofilm is therefore a object of large and increasing research activities, both in the form of biological experiments and that of numerical modeling.
This project uses a cellular automata model to simulate the growth of biofilm with the major purpose of establishing correlation between various condition parameters and the structure of biofilm. The transition rules of the CA include rules for diffusion process, rules for the consumption, and rules for cell division.
The software is developed with Visual C++. OpenGL is used to show the animation of growth process dynamically.

Screen shot

Figure 1 Biofilm with less nutrient concentration (Initial nutrient 6000, number of bacteria 50)
Figure 2 Biofilm with more nutrient concentration (Initial nutrient 20000, number of bacteria 25)

Features

Various control parameters can be set with a dialog. Some other options can be made through menu. The display method that can be chosen include growing the biofilm time-stepwise, continuous growing,, or growing until a given time step. The number of bacteria and current time step are displayed at the status bar. The local nutrient concentration is shown with different brightness.

Visualization of time sequence data mining

Introduction

Time series data occurs frequently in business applications and in science. People try to find some rules relating patterns in a time series to other patterns in that series, or patterns in one series to patterns in another series. These found rules would be very helpful for people to make a decision and prediction.
Unfortunately, neither the cluster identifiers (cluster centers) of subsequence nor the rules associating pairs of patterns are not easy to grasp only by examining the numbers. This project developed a piece of software, named seqmine, meaning "sequence mining", to visualize the results of a recently developed data-mining package.
As the basic, seqmine displays the time sequence as a graph. The display can be moved and zoomed easily. It displays the discretized sequence too, which is a series of cluster identifiers for subquences (patterns) starting at every point. It also shows the shape of the patterns, in other words, the cluster centers of the subsequences. The rules, or the relation between pattern is demonstrated intuitively - in a creative way.
The graphics components are mainly developed with OpenGL library to make a good animation.

Screen shot

Figure 1 Sequence shown as the longer curve, and pattern (cluster center) of first subsequence displayed shown as the curve segment.
Figure 2 Consequent #6 happens at the current first point, while three more consequents are possible to happen later (display during the animation).

Features

  1. The time sequence is shown as a thin blue curve. The discretized sequence is shown as a sequence of color blocks at the bottom of the grid. Each color corresponds to a different pattern of subsequence that starts at that point. One cluster center (representative subsequence of a pattern) is shown. It is for the subsequence starting at the left most line of the grid. It is in the same color as the corresponding color block in the discretized sequence and displayed as a thick curve segment. The window width of subsequence can be seen from it.
  2. The display can be scaled in the x (time) direction by the "zoom in" and "zoom out" buttons on the tool bar, or by the menu. The scale in y (value) direction can be changed by choosing menu item "Option/Settings". The display can be moved to left or right direction by the "move left" and "move right" buttons on the toolbar, or by the menu. The display also can be moved so that a certain point is located at the left most line (for the purpose of displaying cluster center or rules) by left-click that point in the display. When the "double-arrow" button on the toolbar is clicked, the display is moved as animation to one direction, and then to the other direction when the end of data is reached.
  3. The rule animation of searching the consequents of a given antecedentis displayed when the "R" button on the toolbar is clicked. The antecedent subsequence is always the one starting at the left most line of the grid. When the rule is to be shown, all the consequents from that antecedent are displayed as a group of thin lines at a higher position, then the display move until the time period of all the consequents expire. When a consequent is found, its cluster center is shown as a thick curve segment as in the previous section, and removed from the group. When the time period of one rule expires, the consequent is just removed from the group. Every the cluster center curve is in the same color as the corresponding color block in the discretized sequence.

Simulation of laser operation on cornea

Introduction

A software called EYE is developed to simulate the procedure and result of cornea correction with laser. The effect of various control paramter and methods are succesullly analyzed with it.

Screen shot

Figure 1 Expected Ablation
Figure 2 Close-packed raster
Figure 2 Overlap rate 30%

Features

Laser spot overlap rate, raster pattern, laser type (flat or Gaussian), sizes of laser spot and their combination can be readly to be set and analyzed.

Biofilm image processing

Introduction

Fractal and fractal dimension are important mathematical concepts used in otherwise completely different problems. Evaluation of fractal dimension from pixel image is of great interests in many areas, e.g. analyzing the image of biofilm (see the first project on this page). Eleven algorithms are implemented in this software named as BIP (biofilm image processor). Two of them are invented by the major author of this software, Qichang Li - a fellow student in the project group. I was actively involved in the design and testing, and was honorably listed as the second author.

Screen shot

Figure 1 Screen shot

Features

The input image files can be in either TIFF or BMP format. The computation process of different algorithms can be shown with animation. The graph used to determine the fractal dimension is also shown a different frame in the user interface. Various control parameter can be set conveniently. A large number of images can be processed in a batch manner, which is crucial when literally ten of thousands of images need to be analyzed.

Modeling with genetic algorithm

Introduction

Natural convection is an important mode of heat transfer in many fields. Convection coefficients, Nusselt number Nu, are modeled as functions of Rayleigh number Ra, inclination angle q, and distance D for two vertically stacked inclined cylinders according to experimental measure of Nu. Using a standard genetic algorithm, a much better modeling is obtained than the previously reported engineering modeling results. The deviation of the models from the experimental data is reduced 57% for the top cylinder, and 73% for the bottom cylinder.
Graphics function is hardly used in this software. Visual C++ is used for organizing the algorithm and providing convenience to set different conditions and parameters.

Screen shot

Figure 1 The display when the program is running.
Figure 2 The dialog to set several GA parameters.

Features

Various control paramters of genetic algorithm, including population size, selection pressure, mutation rate can be set conveniently. Generation information is displayed dynamically in the evolution precess.

Mini DBMS "XDBMS" to evaluate optimization strategy

Introduction

A mini-database management system named XDBMS is implemented. The operations supported in this system include creating table, single tuple insertion, bulkinsertion from text files, and optimization and execution of SQL queries. For selection, the basic scan and index search non-clustered B+ tree are implemented. For joins, nested loop is implemented. Pipelining and flexible buffer management mechanism are implemented too.
The system basically consists four components: interface and parser, table manager (including buffer manager and index manager), optimizer and executor, and B+ tree index.
This software is compile with Visual C++. Since it is designed to be portable to UNIX platform (Solaris or Linux), the special features of Visual C++ are avoided intentionally.

Screen shot

The display when the system starts.
[Projects in Java] 1