CURVES.BAS 28 September 1997 by Marc Kummel aka Treebeard. Contact mkummel@rain.org, http://www.rain.org/~mkummel/ About CURVES: --------------- CURVES is an update of an old program from the Vault (1989) that draws mathematical curves of various types and animates them with unique graphic machines. It is an anthology of several small programs I've written over the years with a common interface. (This shows in all the global variables.) I'm currently working on this program, so look for future updates with more features (and more help). Six different animations are currently implemented. Some of these are very satisfying to watch. Programmers will find useful BASIC routines for FFTs and spline curves in the source code. The all-BASIC FFT is surprisingly fast. Upzip the archive into a directory and type "CURVES" to begin. Press +/- to move through the various menus. Press to begin an animation. Adjust the animation speed with +/- to minimize flicker. Press ile uit to exit the program. There are lots of options on the menus, so explore! * Curves (1): An n-disk hyper-epitrochoidal spirograph ---------------------------------------------------- This is a classic spirograph animation. You can stack up to 6 circles of different sizes to draw complex trochoids. * Curves (2): Lissajous machine ----------------------------- Draws classic Lissajous figures in an intuitive way that you will instantly understand. Fun to watch. * Curves (3): Cartesian ovals (eggs) ---------------------------------- Put a loop of string around two nails and trace with a pencil to draw an ellipse. But if you loop the string around one nail twice, you will get something lopsided that's more egg shaped. It's hard to do multiple loops with real string, but this program makes it easy to find the perfect egg curve. * Curves (4): Sine machine ------------------------ Project the shadow of a point moving around a circle to make a sine wave. You can stack up to 6 circles to make complex waves. * Curves (5): Sine waves ---------------------- Add sine/square/sawtooth waves of different amplitude and frequency to demonstrate how waves combine. Features digital filtering and a fast FFT spectrum display to show wave components. * Curves (6): B-splines --------------------- Click with your mouse to add/delete control points to draw smooth spline curves on the screen. File List: ------------ The files below the dotted line are source files that can be deleted if you don't need then, but I won't do it for you. CURVES.EXE DOS executable CURVES.ICO an icon for Win31 VGAOEM.FON Win31 font in case it's not on your system README.TXT this file TBVAULT.TXT about Treebeard's Basic Vault ------------ CURVES05.MAK file list for PDS/QB CURVES05.BAS source code: main module XQB.BAT batch file to start PDS with source code MAKE.BAT batch file to compile and link from DOS prompt CURVES was written for MS Basic PDS 7.10. QB4.5 will probably need some changes. It won't work with QBasic. To use the source code, you will also need the following files from my NPF program archive, also available from Treebeard's Basic Vault at http://www.rain.org/~mkummel/basic. Copy the files to your CURVES directory. The code requires special library routines, EMS sharing, and huge arrays, so start PDS with /L TBLIB and /ES and /AH options, or use the XQB.BAT batch file. The required files are: NPSUP.BI include file of global declarations and variables GFONT5.BAS code module to use Windows *.FON fonts EMS4.BAS code module to use expanded memory SBSUP16.BAS code module of support routines TBLIB.QLB Quick Library of misc assembler routines TBLIB.LIB Library files for compiling Conditions: ------------- This program and source code are yours to use and modify as you will, but they are offered as freeware with no warranty whatsoever. Give me credit, but do not distribute any changes under my name, or attribute such changes to me in any way. You're on your own! Send comments and fixes to: Marc Kummel aka Treebeard mkummel@rain.org http://www.rain.org/~mkummel/ For more interesting Basic software with source code, check out Treebeard's Basic Vault at http://www.rain.org/~mkummel/basic/