PDA

View Full Version : Looking for AppleSoft Code Sample - HPLOT using sin



billdeg
August 29th, 2008, 07:10 AM
Is it possible to in hi-res mode to draw a sin wave?...and if so Does anyone have a code snippet example?

If HPLOT is used only to draw straight lines, how does one draw curves in hi-res mode using an Apple II AppleSoft BASIC?


The only way I can see to do it is draw one dot at a time, and loop through the beginning to end points using the sin function to plot the points.

Bill

david__schmidt
August 29th, 2008, 08:34 AM
See:
http://www.atariarchives.org/cgp/Ch03_Sec02.php
Don't worry about the 'Atari' in the title - it's really using Applesoft for examples.

billdeg
August 29th, 2008, 08:37 AM
thanks. This is exactly what I needed.
Bill

nige the hippy
August 29th, 2008, 10:03 AM
just something not covered in the code examples...
If you want to beef up the lines, you can use the HPLOT TO (X,Y) command to plot from the last point plotted (or 0,0) to the specified coordinates.

billdeg
September 8th, 2008, 03:25 AM
NOTE: I finished this project. In the end you just have to bang at these things until you get them done. If anyone is going to VCF East this week, I will have a biorhythm program running on my Apple II.

(This post was made in part to cover the spam post that preceded it.)