Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.misc > #21782

Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine.

From Paul Stewart <phorefaux@gmail.com>
Newsgroups comp.sys.acorn.misc
Subject Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine.
Date 2026-01-09 21:42 +0000
Organization A noiseless patient Spider
Message-ID <b491ab985c.Paul@phorefaux> (permalink)
References <5c989287c3basura@invalid.addr.uk>

Show all headers | View raw


In message <5c989287c3basura@invalid.addr.uk>
          Richard Ashbery <basura@invalid.addr.uk> wrote:

> Thought this might be of interest...

> MODE 1920,1080,32 : OFF
> x = 1920: y = 1080
> REPEAT
> REM Random direction
> dir = RND(4)
> IF dir = 1 THEN y = y + 10  : REM Up
> IF dir = 2 THEN x = x + 10  : REM Right
> IF dir = 3 THEN y = y - 10  : REM Down
> IF dir = 4 THEN x = x - 10  : REM Left

> REM Keep graphic on screen
> IF x < 0 THEN x = 0
> IF x > 3838 THEN x = 3838
> IF y < 0 THEN y = 0
> IF y > 2158 THEN y = 2158

> GCOL RND(255),RND(255),RND(255)
> CIRCLE FILL x, y, 20
> FOR delay = 1 TO 1000 : NEXT delay
> UNTIL FALSE

> Parameters set for 1920 x 1080 monitors - alter as required.

> Warning: Very fast graphic routine and might cause migraine - if
> concerned simply increase delay (suggest 100000 instead of 1000).

Slight improvement by getting current the current screen mode

MODE MODE
REM get current screen mode
SYS"OS_ScreenMode",1 TO r0%,r1%
x%= r1%!4
y%= r1%!8
PRINT x%
PRINT y%
x=x%
y=y%
x%=(x%*2)-2
y%=(y%*2)-2

REM MODE 1360,768,32 : OFF
REM x = 1360: y = 768
REPEAT
REM Random direction
dir = RND(4)
IF dir = 1 THEN y = y + 10  : REM Up
IF dir = 2 THEN x = x + 10  : REM Right
IF dir = 3 THEN y = y - 10  : REM Down
IF dir = 4 THEN x = x - 10  : REM Left

REM Keep graphic on screen
IF x < 0 THEN x = 0
IF x > x% THEN x = x%
IF y < 0 THEN y = 0
IF y > y% THEN y = y%

GCOL RND(255),RND(255),RND(255)
CIRCLE FILL x, y, 20
FOR delay = 1 TO 1000 : NEXT delay
UNTIL FALSE



-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

Back to comp.sys.acorn.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Richard Ashbery <basura@invalid.addr.uk> - 2026-01-09 17:08 +0000
  Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Harriet Bazley <harriet@bazleyfamily.co.uk> - 2026-01-09 18:51 +0000
  Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Paul Sprangers <Paul@sprie.nl> - 2026-01-09 20:22 +0100
    Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Richard Ashbery <basura@invalid.addr.uk> - 2026-01-10 14:15 +0000
  Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. freeaak67@freeaakmaaiil.dee - 2026-01-09 21:58 +0100
  Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Paul Stewart <phorefaux@gmail.com> - 2026-01-09 21:43 +0000
  Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Paul Stewart <phorefaux@gmail.com> - 2026-01-09 21:42 +0000
    Re: Simple Graphic Program from 'DeepSeek' Using 'CIRCLE FILL' routine. Richard Ashbery <basura@invalid.addr.uk> - 2026-01-10 14:27 +0000

csiph-web