![]() |
|
Computer programs written in C++ are available here. View screen shots and download source.
These programs solve problems in 2-dimensional graphics and computational geometry.
Label draws a polygon,
and a text label which can be moved
to various positions around it. The label positions are
calculated so that the convex polygons enclosing the
two shapes (the labelled figure and text) are tangent.
The user interface allows a new
figure and text string to be selected.
Uses Qt.
Screen shot. |
label-0.1.tgz (96570 bytes).
Outline2postscript finds a convex polygon enclosing a set of points.
Creates PostScript output.
Screen shot. |
outline2postscript-0.1.tgz (20776 bytes).
These demonstrate various programming techniques,
and features of the C++ language.
CriticalPath - STL containers, sequential file I/O, C++ exceptions.
criticalPath.tgz (6329 bytes).
BinarySearch - Defining a template class, and using fstream.
Performs a binary search on an fstream.
binarySearch.tgz (2814 bytes).
RationalNumber - Operator overloading.
Implements a rational number class.
rationalNumber.tgz (2953 bytes).
Vectors - STL (Standard Template Library) vectors.
vectors.tgz (1570 bytes).
Strings - C++ strings.
strings.tgz (1937 bytes).
Inherit - Multiple inheritance, run-time polymorphism.
inherit.tgz (2774 bytes).
SmartPointer - Reference counting.
smartPointer.tgz (2811 bytes).
Toh - Towers of Hanoi program. Uses recursion.
toh.tgz (1441 bytes).