hgr: add bubble universe code

This commit is contained in:
Vince Weaver 2023-12-15 11:42:40 -05:00
parent 0642baaf70
commit 5796b6523c
5 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,30 @@
include ../../../Makefile.inc
DOS33 = ../../../utils/dos33fs-utils/dos33
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
LINKER_SCRIPTS = ../../../linker_scripts
EMPTY_DISK = ../../../empty_disk
all: bubble.dsk
bubble.dsk: HELLO BUBBLE.BAS
cp $(EMPTY_DISK)/empty.dsk bubble.dsk
$(DOS33) -y bubble.dsk SAVE A HELLO
$(DOS33) -y bubble.dsk SAVE A BUBBLE.BAS
###
HELLO: hello.bas
$(TOKENIZE) < hello.bas > HELLO
###
BUBBLE.BAS: bubble.bas
$(TOKENIZE) < bubble.bas > BUBBLE.BAS
###
clean:
rm -f *~ *.o *.lst BUBBLE.BAS HELLO

View File

@ -0,0 +1,7 @@
bubble universe effect
the BASIC code is based on some from here:
https://www.pouet.net/topic.php?which=2557
the original effect is possibly this by yuruyrau:
https://twitter.com/yuruyurau/status/1226846058728177665

View File

@ -0,0 +1,10 @@
10 HCOLOR=7
20 N=200:R=6.28/235:T=0:SZ=200:SW=280/SZ:SH=SCRH/SZ
30 HGR2:FOR I=0 TO N:RR=R*I:FOR J=0 TO N
40 U=SIN(I+V)+SIN(RR+X)
50 V=COS(I+V)+COS(RR+X)
60 X=U+T
70 HPLOT 32*U+140,32*V+96
80 NEXT J,I
90 T=T+.025
100 GOTO 30

View File

@ -0,0 +1,10 @@
10 HCOLOR=7
20 N=200:R=6.28/235:T=0:SZ=200:SW=280/SZ:SH=SCRH/SZ
30 HGR2:FOR I=0 TO N:FOR J=0 TO N
40 U=SIN(I+V)+SIN(R*I+X)
50 V=COS(I+V)+COS(R*I+X)
60 X=U+T
70 HPLOT 48*U+140,48*V+96
80 NEXT J,I
90 T=T+.025
100 GOTO 30

View File

@ -0,0 +1,2 @@
5 HOME
10 PRINT CHR$(4);"CATALOG"