Sample Plotting Code

by (no login)

 
Below is my program. Line 90 is merely a sine wave but after I understand how to animate, I will change to read from file with earthquake ground motions. The way I am doing the animation is crude. Please provide code that would do a proper animation that looks like the output from program below.
I appreciate your help.
Thanks
Bruce Maison

10 SCREEN 2
20 CLS
30 KEY OFF
40 RANDOMIZE TIMER
50 DEFINT A-Z
60 DELAY! = 0.05
70 ANG! = 0.0
80 FOR N = 1 TO 500
90 DIS1! = SIN( ANG! )
92 CIRCLE (280 + 100.0*DIS1!, 50), 20,,,,0.45
94 CIRCLE (280, 50), 2,,,,0.45
96 CIRCLE (280 + -100.0*DIS1!,100), 20,,,,0.45
98 CIRCLE (280, 100), 2,,,,0.45
130 START! = TIMER
140 WHILE TIMER 150 WEND
160 CLS
170 ANG! = ANG! + 0.1
180 NEXT N
190 END

Posted on Oct 9, 2010, 8:15 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
it seems that line 140 is screwed up... on Oct 20, 1:29 PM

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement