NallysCode

Meet Tom Nally
Tom Nally (user:steelweaver52) is an avid Liberty BASIC hobbyist. Nally is an engineer living in the New Orleans area. Not surprising, Tom's coding interests lie in real life simulations. Tom was one of three editors (Alyce Watson and Brad Moore the other two) of the Liberty Basic Newsletters from May, 2002, through May, 2006. Tom has graciously given permission for his articles to be reprinted here for Just Basic users.

The Tutorials, Simulations and Applications
- Nally's earliest simulations involved graphs, angles and curves. Tom's premier tutorial was an engaging explanation of Cartesian and Polar coordinates. Tom's style is simple enough to understand and humorous enough to keep you reading. If you find yourself needing to understand Cartesian Coordinates, then read

UNDERSTANDING AND PLOTTING POLAR COORDINATES

 * Understanding and Plotting Polar Coordinates

Two programs accompany this tutorial. polar1.bas Atan2.bas For more fun with sines, cosines, arcs and angles, download and see how well you can combine math and art.
 * [[File:polarJB.zip]] - Polar Phun

Later, Tom began coding simulations involving moving objects. The importance of Tom's code was the deceleration of a moving object over time. When Tom coded a bouncing ball, the ball didn't maintain the same speed until it abruptly stopped. The ball slowed to a stop, just the way you would expect a real ball to behave.

SIMPLE MATH FOR MOVING OBJECTS

 * Bouncing Ball Simulation

Simulates a ball bouncing within an enclosed frame. Angles, velocity and deceleration are discussed. This tutorial includes a demo program that accepts and simulates user defined variables. The program terminates the simulation when the ball slows to a velocity of 6 feet/sec or less, combined with an elevation of 6 feet or less.


 * Collission Simulation

Simulates a collission of 6 balls in an enclosed frame. Select the initial angle and velocity of an instigator ball (like the cue ball in billiards), and even the elasticity of the collisions. The article is an indepth tutorial covering angles, speeds, velocity and elasticity. For the full demo program, adapted for Just Basic, download
 * [[File:CollSim.zip]] - Collission Simulation

CREATING "RUBBER BAND" GRAPHIC OBJECTS
Uses the XOR drawing rule to illustrate stretching a drawn figure to place. The left mouse is clicked once to place the beginning x,y coordinates and clicked a second time to place the final x,y coordinates. Two demo programs accompany this tutorial. These demos are modified versions of the original Liberty BASIC demos for Just BASIC compatibility.
 * Creating "Rubber Band" Graphic Objects
 * [[File:FoxCircleJB.zip]] - FoxCircle
 * [[File:CloudToolJB.zip]] - The Cloud Tool

MAPPING REAL WORLD COORDINATES

 * Mapping Real World Coordinates

Defines and describes nodes to be used for drawing Real World Objects. The program uses a series of nodes to scale the drawing larger, while maintaining relative distances. If you have an interest in CAD programming but absolutely no experience, this is an excellent tutorial to learn the basics. For a full demo program, download
 * [[File:ViewportJB.zip]] - Viewport

Note, this is an unaltered program. The original code is fully compatible with Just BASIC.

USING BASIC FOR NUMERICAL INTEGRATION

 * Using BASIC for Numerical Integration

A discussion of finding the area under a curve using both traditional calculus (indefinite integral and definite integral) and computer math (numerical integration). The area under the curve is sliced into a series of trapezoids measured by a custom function in the BASIC program. The article includes a demo program. This article and demo are compatible with both Liberty BASIC and Just BASIC.

More of Tom's Offerings
- Throughout the summer (2006), more of Nally's Liberty Basic Newsletter articles and programs will be appended here. In the meantime, all of Nally's original content remains available in the LB Newsletters. Read the LB Newsletters online, or download the file archives, at http://babek.info/libertybasicfiles/lbnews/