Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #5873
| From | Sebastian Barthel <naitsabes@freenet.de> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Rotating a Colour-Filled Square |
| Date | 2019-11-15 21:26 +0000 |
| Organization | solani.org |
| Message-ID | <qqn567$q84$1@solani.org> (permalink) |
| References | (3 earlier) <58125f40fdbasura@invalid.addr.uk> <qqi40d$e0m$1@solani.org> <qqjgq3$dkd$1@solani.org> <5812df5497basura@invalid.addr.uk> <qqk9v8$ull$1@solani.org> |
Am Thu, 14 Nov 2019 19:29:44 +0000 schrieb Sebastian Barthel: > Am Thu, 14 Nov 2019 16:24:43 +0000 schrieb Richard Ashbery: > >> In article <qqjgq3$dkd$1@solani.org>, Sebastian Barthel >> <naitsabes@freenet.de> wrote: >>> Am Wed, 13 Nov 2019 23:35:41 +0000 schrieb Sebastian Barthel: >> >>> > Am Wed, 13 Nov 2019 17:05:44 +0000 schrieb Richard Ashbery: >>> > >>> >> ... but what I'm really after is a method to overlay the existing >>> >> square with other successively smaller squares in alternating >>> >> colours. > >> This is turning out to be a rather nice little animation. ... > > This could be a feature. > We'll see if it finds its way into reality. So, today it happened ... its there in its full glory with a sinustable and the double buffering included. Other interesting colour combinations can be found by modifying the number in the GCOL statement. In exchange of the 32 the numbers 23, 45 and e.g. 68 gave interesting results. I wonder if there is an official way to claim the needed memory for the double buffering. All the things I tested didn't work. (OS_ClaimScreenMemory, OS_Byte 114 ...) Thats why there is a doubled MODE line. The first reserves the Memory, the second is the real thing. Have a look and hopefully it gives some funny minutes to whom whoever runs it. REM BBC BASIC Code , rotating squares - filled with fancy colours REM uses FILL command, layers of squares shouldn't "touch" ON ERROR REPORT : PRINT " ERROR IN ";ERL : END DIM STB(720) : REM STB sinustable R=0 FOR I%=0 TO 719 : STB(I%)=SIN(R) : R=R+(4*PI /720) : NEXT I% MODE 1280,1024,16 MODE 1280,1024,8 SCREENBANK%=2 ORIGIN 1024,1024 WHILE R<>-1 FOR R=0 TO 360 STEP 3 WAIT SYS "OS_Byte",113,SCREENBANK% SCREENBANK% = SCREENBANK% MOD 2 +1 SYS "OS_Byte",112,SCREENBANK% CLG ANGLESIN=R ANGLECOS=R+90 FOR F=50 TO 900 STEP 105 GCOL ( F MOD 32 ) X0=STB(ANGLESIN)*F : Y0=STB(ANGLECOS)*F X1=STB(ANGLESIN+90)*F : Y1=STB(ANGLECOS+90)*F X2=STB(ANGLESIN+180)*F : Y2=STB(ANGLECOS+180)*F X3=STB(ANGLESIN+270)*F : Y3=STB(ANGLECOS+270)*F POINT X0,Y0 DRAW X1,Y1 : DRAW X2,Y2 : DRAW X3,Y3 : DRAW X0,Y0 XMIN=STB(ANGLESIN)*(F-8) : XMINY=STB(ANGLECOS)*(F-8) FILL XMIN,XMINY ANGLESIN=ANGLESIN+( STB(ANGLESIN)*7 ) ANGLECOS=ANGLESIN+90 NEXT F NEXT R ENDWHILE
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-12 14:05 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-12 23:04 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-14 16:24 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-14 19:29 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-15 21:26 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-15 22:23 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-15 22:31 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-16 14:05 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-16 19:47 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-18 20:02 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-16 00:39 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-16 12:21 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-17 10:04 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-17 13:50 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-17 14:19 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-17 14:21 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-17 15:34 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-17 16:25 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-18 16:17 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-18 16:55 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-16 11:48 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-16 14:21 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-18 20:04 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-19 14:48 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-19 20:26 +0000
Re: Rotating a Colour-Filled Square Brian Jordan <brian.jordan9@btinternet.com> - 2019-11-19 20:39 +0000
Re: Rotating a Colour-Filled Square Dave <dave@triffid.co.uk> - 2019-11-20 07:50 +0000
Re: Rotating a Colour-Filled Square Alan Adams <alan@adamshome.org.uk> - 2019-11-20 11:26 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-16 19:27 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-16 23:37 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-14 20:47 +0000
Re: Rotating a Colour-Filled Square druck <news@druck.org.uk> - 2019-11-14 20:44 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-15 13:35 +0000
Re: Rotating a Colour-Filled Square Steve Fryatt <news@stevefryatt.org.uk> - 2019-11-16 00:32 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-13 12:54 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-13 17:05 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-13 23:35 +0000
Re: Rotating a Colour-Filled Square Sebastian Barthel <naitsabes@freenet.de> - 2019-11-14 12:20 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-14 14:09 +0000
Re: Rotating a Colour-Filled Square Richard Ashbery <basura@invalid.addr.uk> - 2019-11-14 15:21 +0000
Re: Rotating a Colour-Filled Square news@sprow.co.uk - 2019-11-14 05:00 -0800
csiph-web