Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1525
| From | Colin McDonagh <colmcdonagh@btinternet.com> |
|---|---|
| Subject | Re: *REFRESH |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2012-03-22 19:56 +0000 |
| Message-ID | <527498f75bcolmcdonagh@btinternet.com> (permalink) |
| References | <52741d1e5dcolmcdonagh@btinternet.com> <469ff090-12eb-40a7-af37-62c79881d65e@v22g2000vby.googlegroups.com> <5a472327-24da-4f06-b92e-209ccb39afe8@j14g2000vbc.googlegroups.com> |
| Organization | Home |
In article <5a472327-24da-4f06-b92e-209ccb39afe8@j14g2000vbc.googlegroups.com>, jgharston <jgh@arcade.demon.co.uk> wrote: > > set up two screen banks ... Thanks JG, This is my prog, where do I put the WAIT etc.. Cheers Colin. REM Simulate hybrid coupler Wave. REM 15/03/2012 MODE 28 :REM 256-colour mode : ON ERROR PROCerror : END : REM**************************************** : GCOL 132 :REM Sets graphic background colour to (132-128) = 4, blue. CLG :REM Clears graphic screen to background colour GCOL 7 :REM Sets graphic foreground colour to 7, white. COLOUR132 REM**************************************** : LeftEdge% = 0 RightEdge% = 1279 TopEdge% = 1023 BottomEdge% = 0 PROCbox : VDU 28,5,50,80,60 :REM Set up a text viewport : COLOUR 1 xtemp = 0 ytemp = 0 : FOR Phase = 0 TO 359 STEP 2 loiter = INKEY(10) CLS PROCbox : FOR Angle = 0 TO 1280 STEP 1 : Colour = 3 :REM Yellow line PROCwave1(Colour, Angle, Phase, X, Y) xms = X^2 + xtemp yms = Y^2 + ytemp NEXT Angle xrms = SQR(xms) yrms = SQR(yms) PRINT TAB(50,20) "X = " xrms, TAB(50,40) " Y = " yrms NEXT Phase : END : DEF PROCerror REPORT PRINT " at Line " ; ERL ENDPROC : DEF PROCbox MOVE RightEdge% , TopEdge% REM Moves cursor to point (1279,1023), top right corner of 'standard' screen. : REM Next four lines draw line around edge of 'standard' screen. DRAW LeftEdge% , TopEdge% DRAW LeftEdge% , BottomEdge% DRAW RightEdge% , BottomEdge% DRAW RightEdge% , TopEdge% ENDPROC DEF PROCwave1(col, angle, phi, RETURN x, RETURN y) GCOL col TINT 0 :REM yellow lines or blue lines angleRad = (angle/(2*PI))/9 phaseRad = (phi/(2*PI))/9 A = 100*SIN(angleRad) :REM This is a wave, fixed to the right. B = 100*SIN(angleRad+phaseRad) :REM This is wave moving left. REM phase shift one by -90 degrees minusjA = 100*SIN(angleRad-PI/2) REM phase shift by -90 degress minusjB = 100*SIN(angleRad+phaseRad-PI/2) REM To the right PLOT &45, angle, A + 800 : PLOT &45, angle, B + 200 GCOL col+2 REM To the left x = 0.5*A + 0.5*minusjB y = 0.5*B + 0.5*minusjA REM The hybrid wave is the sum of two above. PLOT &45, angle, x+620 PLOT &45, angle, y+400 : ENDPROC
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
*REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-21 21:23 +0000
Re: *REFRESH jgharston <jgh@arcade.demon.co.uk> - 2012-03-21 15:39 -0700
Re: *REFRESH jgharston <jgh@arcade.demon.co.uk> - 2012-03-21 15:42 -0700
Re: *REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-22 19:56 +0000
Re: *REFRESH Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2012-03-22 06:42 +0100
Re: *REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-22 20:00 +0000
csiph-web