高級C語言源程序范例
Source Code from Que publications
"Advanced C" Techniques and Aplications
ISBN 0-88022-162-3 Advanced C Techniques and Applications QUE
Unpack into a directory with the following structure
root - Contents of this arc.
root/bgs Contents of BGS.arc
root/uis Contents of UIS.arc
root/grfuser Contents og grfuser.arc
cordic methods describe essentially the same algorithm that with suitably chosen inputs can be used to calculate a whole range of scientific functions including sin, cos, tan, arctan, arcsin, arccos, sinh, cosh, tanh, arctanh, log, exp, square root and even multiply and divide.
the method dates back to volder [1959], and due to its versatility and compactness, it made possible the microcoding of the hp35 pocket scientific calculator in 1972.
here is some code to illustrate the techniques. ive split the methods into three parts linear, circular and hyperbolic. in the hp35 microcode these would be unified into one function (for space reasons). because the linear mode can perform multiply and divide, you only need add/subtract and shift to complete the implementation.
you can select in the code whether to do the multiples and divides also by cordic means. other multiplies and divides are all powers of 2 (these dont count). to eliminate these too, would involve ieee hackery.
LBreakout a breakout-style arcade game for Linux
Requirements:
X11, SDL[1.0 or better]
Installation:
1. type ./configure
options:
--disable-sound [no sound]
--disable-install [no installation play from source directory]
[e.g. ./configure --disable-sound --disable-install ]
2. type make
3. become root
4. type make install [only if install is not disabled]
5. type lbreakout to play
In computer vision, sets of data acquired by sampling the same scene or object at different times, or from different perspectives, will be in different coordinate systems. Image registration is the process of transforming the different sets of data into one coordinate system. Registration is necessary in order to be able to compare or integrate the data obtained from different measurements. Image registration is the process of transforming the different sets of data into one coordinate system. To be precise it involves finding transformations that relate spatial information conveyed in one image to that in another or in physical space. Image registration is performed on a series of at least two images, where one of these images is the reference image to which all the others will be registered. The other images are referred to as target images.
have recently become very interested in the area of genetic algorithms and Ant Colony Optimization techniques. I was determined to write a complete program demonstrating these two techniques. In particular I wanted to compare the efficiency of these two approaches in the area of finding solutions to the Traveling Salesman Problem