## Biorhythm - possible to output a tight hi-res sin curve - need code snippet

Expand Messages
• Is it possible on an Apple II using hi-res mode to draw a nice tight sin wave?...and if so Does anyone have a code snippet example? I don t like the blocky
Message 1 of 3 , Aug 29, 2008
• 0 Attachment
Is it possible on an Apple II using hi-res mode to draw a nice tight sin wave?...and if so Does anyone have a code snippet example? I don't like the blocky low-res output, I would prefer the hi-res approach.

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

I will continue to search the typical places. If anyone knows of a magazine with an example, I may have it too. I could write the curve pixel by pixel using a sin function to set the HPLOT variables, is that how it's done?. Otherwise the program is pretty much done, and is Y2K compliant.

Bill
• Bill,     Seems like that should be pretty easy using HPLOT and the built-in SIN function.   You ve got 280 x 160 in high-res. Something like:    10 D =
Message 2 of 3 , Aug 29, 2008
• 0 Attachment
 Bill,     Seems like that should be pretty easy using HPLOT and the built-in SIN function.   You've got 280 x 160 in high-res. Something like:    10 D = 0                          starting angle in degrees    20 For X = 40 to 240         x value for HPLOT    30 D = D + 3                    determines how many cycles of sine you     get    20 AngRad  = 0.17453 X    (convert X from deg to rad)    --- On Fri, 8/29/08, Bill Degnan wrote:From: Bill Degnan Subject: [midatlanticretro] Biorhythm - possible to output a tight hi-res sin curve - need code snippetTo: midatlanticretro@yahoogroups.comDate: Friday, August 29, 2008, 11:39 AMIs it possible on an Apple II using hi-res mode to draw a nice tight sin wave?...and if so Does anyone have a code snippet example? I don't like the blocky low-res output, I would prefer the hi-res approach. If HPLOT is used only to draw straight lines, how does one draw curves in hi-res mode using an Apple II AppleSoft BASIC? I will continue to search the typical places. If anyone knows of a magazine with an example, I may have it too. I could write the curve pixel by pixel using a sin function to set the HPLOT variables, is that how it's done?. Otherwise the program is pretty much done, and is Y2K compliant. Bill

• Stupid yahoo e-mail tool.  Sends my reply when I hit tab?  Huh?    Take two:    5  HGR                      switch to hi-res mode
Message 3 of 3 , Aug 29, 2008
• 0 Attachment
 Stupid yahoo e-mail tool.  Sends my reply when I hit tab?  Huh?    Take two:    5  HGR                      switch to hi-res mode   10 D = 0                      starting angle in degrees   20 For X = 40 to 240    size on display in pixels   30 D = D + 3                determines how many cycles we see   40 R = D * 0.017453     convert to radians   50 V = SIN (R)   60 V = V * 20               determines Y amplitude of sine in pixels (40)   70 Y = 100 + V            100 is X axis Y coord   80 HPLOT X,Y   90 Next X    Syntax is probably all wrong for Applesoft, but you get the idea.  Too lazy to get out my Ace-500 and try this out...    Bob Grieb --- On Fri, 8/29/08, Bill Degnan wrote:From: Bill Degnan Subject: [midatlanticretro] Biorhythm - possible to output a tight hi-res sin curve - need code snippetTo: midatlanticretro@yahoogroups.comDate: Friday, August 29, 2008, 11:39 AMIs it possible on an Apple II using hi-res mode to draw a nice tight sin wave?...and if so Does anyone have a code snippet example? I don't like the blocky low-res output, I would prefer the hi-res approach. If HPLOT is used only to draw straight lines, how does one draw curves in hi-res mode using an Apple II AppleSoft BASIC? I will continue to search the typical places. If anyone knows of a magazine with an example, I may have it too. I could write the curve pixel by pixel using a sin function to set the HPLOT variables, is that how it's done?. Otherwise the program is pretty much done, and is Y2K compliant. Bill

Your message has been successfully submitted and would be delivered to recipients shortly.