News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_freemac

a CPC screensaver found on fb

Started by freemac, 22:45, 24 May 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freemac


A cool cos/sin lines draw.

Hacked a few, adding "randomize time" and also a quite good comparaison between current line draw and first one... so no delay is added between "animations".


ComSoft6128

Looks like we were using the same or similar Basic program - 25 years apart :D

EgoTrip

Wasn't there similar listings in the manual?

Gryzor

I think the manual was responsible for a small, but persisting scene for such 'demos' :D

George Schizas

The listing, for anybody that wants to try it:



10 REM graphics by Salim Benadel
15 RANDOMIZE TIME
20 DEFINT b,c,x:DEFREAL d,e,f
30 MODE 2
40 b=RND*5+1:c=RND*5+1
50 ORIGIN 320,200
55 d=100*COS(1):e=200*COS(1/b):f=200*SIN(1/c)
60 FOR a=2 TO 1000 STEP PI/30
70 x=100*COS(a):MOVE x,x
80 DRAW 200*COS(a/b),200*SIN(a/c)
90 IF INT(d/20)=INT(5/COS(a)) AND INT(e/20)=INT(10*COS(a/b)) AND INT(f/20)=INT(10*SIN(a/c)) THEN 110
100 NEXT a:GOTO 30
110 FOR z=a TO a+20 STEP PI/30
120 x=100*COS(a):MOVE x,x
130 DRAW 200*COS(z/b),200*SIN(z/c)
140 NEXT z:GOTO 30

Powered by SMFPacks Menu Editor Mod