Advertisement
EmanueleBonin

Attrattori instabili

Apr 28th, 2020
3,461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0 rem per commodore 128
  2. 5 color 0, 2
  3. 6 color 1, 5
  4. 8 color 2, 10
  5. 9 color 3, 15:color 4,1:color 5,12
  6.  
  7. 10 graphic 1, 1
  8. 12 fast: rem remmare questa e la riga 220 se si vuole vedere la costruzione
  9. 15 a=1.11:y=0:sn=sin(a):cs=cos(a)
  10. 18 xi=-1.2:xf=1.2:yi=-1.2:yf=1.2
  11. 20 sx=(xf-xi)/320:sy=(yf-yi)/200
  12. 30 for xc=xi to xf step sx:y=xc:x=xc:i=1
  13. 150 do while i <= 200
  14. 158 if x > 1.0E+15 then exit
  15. 165 yx = y-x*x
  16. 170 xx=x*cs-yx*sn
  17. 180 y=x*sn+yx*cs
  18. 190 x=xx
  19. 201 px=160+int(x/sx):py=100-int(y/sy)
  20. 203 if px>0andpx<321andpy>0and py<201 then draw 1, px, py
  21. 204 i=i+1
  22. 206 loop
  23. 211 next
  24. 220 slow
  25. 230 getkey a$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement