Welcome, Guest. Please login or register.

Author Topic: Beginner Programing  (Read 8033 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline peroxidechicken

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 170
    • Show all replies
Re: Beginner Programing
« on: February 23, 2003, 12:32:38 AM »
Hello Melott.  Don't you hate backseat drivers?  How did you go with AmigaBASIC on your A3000?  

When I started with AmigaBASIC, one of the first programs I tangled with was this:

rem --- mandelbrot set for amigabasic ---
rem --- by tim stepthens 1990 ---
screen 1,640,200,4,2
window 2,"mandelbrot set",,31,1
color 1,2
cls
locate 10,11
input "interations (1 to 1000) ",iter
cls
if iter=0 then iter=25
a:
a=0
for y=0 to 93
for x=0 to 617
b:
zx1=(x-410)/190
zy1=(y-95)/90
zy=zy1
zx=zx1
c:
for a=1 to iter
zy2=zy*zy
zx2=zx*zx
if zy2+zx2>4 then goto d
zy=2*zx*zy+zy1
zx=zx2-zy2+zx1
next a
goto f
d:
d=a mod 16
color d
if d=2 then color 1
e:
pset (x,y)
pset (x,186-y)
f:
next x
next y

 - fractals were all the rage 15 years ago!  But I think the important thing is that it gives some visual feedback - so many program examples for lower level langages don't do that.  
H2O2