• programs page
• example programs in C++, Python, and Mathematica
• Circles (Python program)
• = a ZIP file (4 KB) containing source code for Circles, a periodic epicyclic orbit simulator with random parameters.
The background pictures on this website were generated using this program. Requires Python and SciPy to run.
EDIT: Program has been revised to use PyLab's interactive mode for graphics.
• NumPy / SciPy Example Programs
• = a ZIP file (0.8 MB) containing four programs demonstrating common scientific computing tasks:
• Numerically integrate ordinary differential equations and save the results to a file.
• Fast Fourier Transform data from a file and plot a power spectrum.
• Generate random numbers, statistically test them for uniformity, and plot a histogram.
• Find eigenvalues and eigenvectors of a real, square matrix and plot the eigenvalues.
These programs are intended as a reference for myself (e.g. when I forget how to sort eigenvalues, plot a histogram, etc.) but may also
be useful as an introduction to numerical programming. All programs require Python and SciPy to run.
EDIT: Programs have been revised to use PyLab's interactive mode for graphics.
• Fidelio (Python program)
• = a ZIP file (0.2 MB) containing docs and source code for Fidelio, a program for learning cryptography.
Fidelio includes Caesar and polyalphabetic ciphers along with RSA key generation and encryption/decryption. Source code can be quickly adapted for
user-defined character sets. Fidelio's encryption schemes should NOT be considered secure for professional encryption! Requires Python to run.
• Sit 'N Go Tournament Model (Mathematica notebook)
• = a Mathematica NB file (0.03 MB) binomial model of a series of winner-take-all poker tournaments.
The model does not include any actual details of poker; contests are modeled as independent, identically distributed events in which several players
of identical skill compete against a player of superior skill for a fixed amount of money. Requires Mathematica version 6 or later to run.
• RandomMatrix (C++ random square matrix generator)
• = a ZIP file (0.4 MB) containing source code and the open-source (LGPL) Eigen v2.0.1 algebra library.
The program produces examples of various real, square random matrices and, when possible, finds their eigenvalues. RandomMatrix is not much use
in and of itself, but it demonstrates basic use of the Eigen library. Requires a C++ compiler to compile and run.