programming a spiral in basic

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: programming a spiral in basic

Post by 777 »

p13z wrote: Tue Sep 29, 2020 5:49 pm This is a tiny addition to my earlier attempt, easy to tweak, just added the third parameter to DRAW.
Rough, slow, but as simple as you can get - bit like me.

Code: Select all

10 PLOT 127,83
20 FOR a=1 TO 87
30 DRAW a*COS a,a*SIN a,1.08
40 NEXT a
Image
this was more the effect i was after, like a galaxy...

https://imgur.com/a/6SIX3w1

Code: Select all

1 BORDER 0: BRIGHT 1: PAPER 0: INK 7: CLS 
50 LET s=0
100 FOR a=1 TO 4000
120 LET x=SIN a*PI*s
125 LET y=COS a*PI*s/1.45
126 LET s=s+.01
130 PLOT x+128,y+87
200 NEXT a
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
Post Reply