The program models a two-pendulum harmonograph, with each pendulum
constrained to move one-dimensionally.  One is aligned vertically,
and the other horizontally.

The two pendulums are configured with the "hor length" and "vert
length" parameters for the lengths from pivot to mass. Length is
measured in inches. Another configurable number represents the
strength of friction. If you double the friction, then there will be
about half as many cycles before the pendulums comes to rest.

You can also control the start of each pendulum's swinging.  The
parameters are amplitude and phase. An amplitude of "1" will fill the
graph. Phase works as follows
    0.0    start from full extension in one direction
    0.25   start from center (pendulum vertical) with
           peak momentum in one direction
    0.5    start from full extension in the other direction
    0.75   start from center (pendulum vertical) with
           peak momentum in the opposite direction
In-between phases are fine. In fact, the phase can be any number at
all. It's just that numbers like 1,2,3,... have little use because
they have the same effect as 0.

For the sake of ratio relationships, lengths may be entered as
ratios. For example, the "hor length" could be "121/25".

It is important to note that to double the frequency of a
pendulum, its length must be halved *twice*. That is, it
must be divided by 4.  So if you want to see a ratio of 2 to 3
you might use lengths of 36 and 16.

Friction was difficult to implement, but in my opinion the results are
worth it -- considerably closer to what the physical harmonograph
produces, as beautiful of the earlier results with the "Lissajous"
program and more interesting.  

The graphical window does not distort the shape drawn by the
harmonograph.  This makes it possible for friction to be correct, and
also prevents printing from distorting the shape.

Printing may not work right due to quirks of wxwidgets (the program
development system that "harmonograph" is built from).  What works for
me is to choose "Print..." and from there click the "Setup..." button.
Choose "Letter" size paper before printing, because wxwidgets
defaults to the European standard paper which is a different shape.

If the output contains noticeable corners, that may be due to the
motion being so fast that the program does not recalculate speed and
direction smoothly. When both pendulums have a length of at least 20
inches, the smoothness is good.

The native "save" file for harmonograph is "hgf". It saves the
parameters and the graph, but not in a form which can be read by any
other program.  Well... you can read it with Notepad if you like to
look at a lot of numbers. To create a "bmp" file for another program,
use the Export menu.

Physics
The Harmonograph program models a two-pendulum, vertical/horizontal
harmonograph, using the essential physics that makes its motion
interesting.  The force of gravity on each pendulum is proportional to
its displacement from the center of motion, based on the mass at the
end of the pendulum and the gravitational constant.  Gravitation is as
on Earth. Pendulum mass is not settable since it does not affect the
period of the pendulum. The friction force directly opposes the
pendulum's motion. A unit of friction provides a certain amount of
deceleration relative to the size of the drawing frame, roughly
sufficient to bring a pendulum from full swing to full stop in one
cycle. A whole unit of friction really suppresses the fun, so use a
small fraction.

Motion is modelled by recalculating position, velocity, and
acceleration 83 times per second.

Program
Built with wxwidgets 2.4.2.
Thanks to the team http://www.wxwidgets.org/whowhat.htm.
