Forum

From PMD 85 Infoserver

Jump to: navigation, search
:: back to start of topic :: back to topic list ::
Message
Author  Author ::  Laco
Posted  Posted ::  2014-12-21 06:09:23 PM
Subject  Subject ::  Re: kvapka vody
Nasiel som na jednom starom zaznamovom mediu :)
Povodna verzia:

5 REM BUBLINA
10 SCALE -20,30,-20,30
20 FOR Y= -20 TO 20 STEP 0.5
30 FOR X= -40 TO 30 STEP 0.5
40 R= SQR(X^2 + Y^2)
50 IF R=0 THEN 80
60 PLOT X+1*((Y+17)/2),Y+20*(SIN(R)/R)
70 GOTO 90
80 PLOT (Y+17)/2, Y+20
90 NEXT X
100 MOVE -20,-20
110 NEXT Y
120 END


alebo moja upravena verzia:

5 REM BUBLINA
6 DIM F(180)
7 FOR C = 0 TO 179: F(C)=-30: NEXT C
8 GCLEAR: PEN 0
10 SCALE -20,30,-20,30
20 FOR Y= -20 TO 20 STEP 0.5
30 FOR X= -40 TO 30 STEP 0.5
40 R= SQR(X^2 + Y^2)
50 IF R=0 THEN 80
55 A = X+((Y+17)/2): B = Y+20*(SIN(R)/R)
57 IF F((A+41.5)*2) > B THEN B=F((A+41.5)*2)
58 F((A+41.5)*2) = B
60 PLOT A,B,1
70 GOTO 90
80 PLOT (Y+17)/2, Y+20
90 NEXT X
100 MOVE -20,-20
110 NEXT Y
120 END


Pripadne doporucujem vyskusat aj upravit riadok 60 bez ",1" alebo pridat ",1" v povodnej verzii.
Prijemne travenie casu :)
:: back to start of topic :: back to topic list ::