Some BASIC Stuff
================

It's probably useless for about 99% of people. But I wished to try some
structural mechanics stuff - a computation of internal forces on a
simply-supported beam with arbitrary moments on the ends (the continuous load
can be linearily changoing from the qa to the qb value.:

 Ma  qa                      qb Mb
 --  VVVVVVVVVVVVVVVVVVVVVVVVVV <-
 |   --------------------------  |
 ->  ^                        ^ --

     |<--------- L ---------->|


The BASIC program can look like this (tested with the Bywater BASIC 2.2 [1]):

---------------------------------------
# file: intforces.bas
---------------------------------------
REM Computes V and M forces on beam if Va Ma, Mb, L, qa, qb are given
10 DATA 2 -2 5 2 2 
20 READ  A, B, L, Q, R
30 FOR I = 0 TO 10
40 LET X = I / 10 * L
41 LET Y = L - X
42 LET P = Q*L/2 - Q*X + ((R-Q)*L/6 - (R-Q)*X*X/2/L)
43 LET V =  P - (B+A)/L
45 LET P = Q*X*L/2 - Q*X*X/2 + ((R-Q)*x*L/6 - (R-X)*x*x*x/6/L)
46 LET M = P + (B*X - A*Y)/L
50 PRINT I,X,V,M
99 NEXT I
---------------------------------------

Used with: 'bwbasic intforces.bas |tee a' to see the shear forces (V) and
bending moments (M) sizes and the in the Gnuplot [2]:
'plot "a" using 2:(-$4) title "M" w lp, "a" using 2:3  title "V"w lp,0 
title "-"' to see the graphs.

The next steps will be: a) adding some user input (and not to use DATA
statement); b) graphing for the SmallBASIC in order to have this thingy on my
Palm III; c) modify the whole thing for the Elektronika MK-90.


References:

[1] http://bwbasic.sf.net
[2] http://www.gnuplot.info