How To Program "Barnsley Fern" in BASIC | Commodore Plus/4, 64, 128 | Codereview

  Рет қаралды 328

George's Channel

George's Channel

Ай бұрын

"Barnsley Fern" (Fractal)
A small codereview of this small Commodore 3.5 BASIC Program for the Commodore 16, 116 and Plus/4. Compatible with BASIC 7.0 for the Commodore 128
For the Commodore 64 try this BASIC 3.5 extension:
Link: csdb.dk/release/?id=189017
Wikipedia "Barnsley Fern":
en.wikipedia.org/wiki/Barnsle...
Code
(Replace {less} with the mathematical "less" symbol)
new
5 REM BARNSLEY FERN
10 YY(1)=.16
20 XX(2)=.85:XY(2)=.04:YX(2)=-.04:YY(2)=.85:Y(2) = 1.6
30 XX(3)=.20:XY(3)=-.26:YX(3)=.23:YY(3)=.22:Y(3) = 1.6
40 XX(4)=-.15:XY(4)=.28:YX(4)=.26:YY(4)=.24:Y(4) = .44
50 color4,1:color0,1:color1,6,4
55 graphic1,1
60 X=0:Y=0
70 FOR I = 1 TO 7500
80 R = INT(RND (1) * 100)
90 IF R {Less} 1 then F=1:ELSEIF R {less] 86 then F=2:ELSEIF R {less} 93 then F=3:ELSE F=4
100 X = XX(F) * X + XY(F) * Y
110 Y = YX(F) * X + YY(F) * Y
120 Y = Y + Y(F)
130 X% = 151 + X * 29.9
140 Y% = 200 - Y * 19.1:Color1,F+4,6
150 draw, X%,Y%
160 NEXT
170 GETKEY K$:GRAPHIC 0
run
#barnsley #fern #barnsleyfern #fractal #basic #commodore #retro #programming #C16 #plus4 #c116 #c64 #Apple #Atari #Amiga

Пікірлер: 1
@visitandolosclasicos
@visitandolosclasicos Ай бұрын
it could also work on the c64 with the super expander cart as well
The BASIC programming language and how it ended up on the Sega Saturn | MVG
13:17
Turning bad React code into senior React code
13:10
Cosden Solutions
Рет қаралды 83 М.
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 421 М.
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 23 МЛН
trigonometry like you've never seen it
25:53
Michael Penn
Рет қаралды 12 М.
I wrote a BASIC interpreter! What should I do with it?
11:03
Gary Explains
Рет қаралды 11 М.
Modern games for Commodore plus/4
28:10
C64 Portal
Рет қаралды 6 М.
100 Commodore Plus/4 games
17:01
Péter Hoványi
Рет қаралды 17 М.
POPPY GAME INSULT TO OUR WAR DEAD
11:23
Ahoy
Рет қаралды 210 М.
The Truth About Learning Python in 2024
9:38
Internet Made Coder
Рет қаралды 100 М.
Running a Buffer Overflow Attack - Computerphile
17:30
Computerphile
Рет қаралды 2 МЛН
Commander X16 BASIC Tutorial: Lissajous Curves
16:46
George's Channel
Рет қаралды 305
My Top 7 Reasons Why Retrocomputing Is So Popular
4:17
George's Channel
Рет қаралды 485
Samsung vs Apple Vision Pro🤯
0:31
FilmBytes
Рет қаралды 1,3 МЛН
Airpods’un Gizli Özelliği mi var?
0:14
Safak Novruz
Рет қаралды 6 МЛН
#miniphone
0:18
Miniphone
Рет қаралды 4 МЛН