[nSLUG] Re: Graphics library?

Mike mspencer at tallships.ca
Wed Feb 14 02:52:43 AST 2007



Me> Looking around for a graphics C library...

Ian> Allegro?

That might be it, thanks.  I'll have a look.  It's downloading now.


Jeff> What is the end goal here? Programming graphics? Or getting good
Jeff> graphics with some tool?

The goal is to visualize the behaviour of a real mechanical device
which has (at least) three parameters or adjustable settings.  The
real machine is known to behave poorly with improper settings but the
only guides to correct settings are the intuition and guesswork
deriving from experience.

I already have a script that simulates the motion using discrete time
intervals and some (possibly faulty) assumptions to print out position
vs. time data which can then be plotted with gnuplot. And I can indeed
see the development of poor behaviour when parameters are varied.
But, at least for me and likely for other artists who use these
machines, visualization would be much nicer.  This will entertain and
perhaps enlighten me, possibly others as well.

If that's already boring, y'all can stop here. :-)

The device is a Little Giant-type (actually, Canadian-made Jardine)
power hammer.

    A round flywheel mounted on  the end of a horizontal shaft,

    A trunnion pin projecting from one face of the flywheel near the edge,

    A connecting rod that pivots on the trunnion and connects rigidly
    to

    A spring-loaded toggle affair below the flywheel.

    A 25 {50,100,250} pound mass connects to the lower end of the
    toggle affair by a pivot.  The mass is constrained to move only
    vertically by tracks.

    An anvil upon which the mass strikes, with or without a workpiece
    intervening.  If there's a workpiece, the impact will be far from
    completely elastic, else very close to completely elastic.

Although the toggle affair is straightforward, it complicates the
calculations substantially.  I've omitted it from the model for a
first approximation, replacing it with a simple spring.  The spring
constant of the (real, toggle) spring is known and serves as a first
approximation for the notional one.

A real machine of this type runs at between 150 and 400 RPM.  Dave
Manzer (now deceased) did some experiments in Alberta with a strobe
light to visualize misbehaviour.  If a computer model can be run
visually, time can be slowed in the rendering while maintaining the
full speed in the computation.  That should allow visual discovery of
the parameter ranges within which the hammer behaves properly.

A Real Engineer would probably just work it all out with calculus but
I'm a tad weak in that domain, preferring visualization.  Hence the
model.


- Mike

-- 
Michael Spencer                  Nova Scotia, Canada       .~. 
                                                           /V\ 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^

!DSPAM:45d2b1f529681399421231!




More information about the nSLUG mailing list