Advertisement
linesguy

lissajous curve (updated)

Feb 15th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. 20 hgr2
  2. 30 dim si(1000)
  3.  
  4. 60 A = 4 : B = 5
  5. 70 r = 95 : rem max 95
  6. 80 acc = 57
  7. 90 sm = 10
  8.  
  9. 99 a = a / sm : b = b / sm
  10.  
  11. 110 Poke 230,32 : gosub 500 : Poke 49236,0 : poke 230,64 : gosub 500 : poke 49237,0 : goto 110
  12. 500 rem temp
  13. 501 hcolor = 0 : gosub 910 : rem clear screen
  14. 510 hcolor = 3 : gosub 1000 : rem lissajous curve
  15.  
  16. 900 return
  17. 910 hplot 0,0 : call -3082 : return
  18.  
  19. 1000 hplot r+(sin(vx+v)*r),r+(cos(vy)*r)
  20. 1010 vx = vx + A : vy = vy + B
  21. 1015 hplot to r+(sin(vx+v)*r),r+(cos(vy)*r)
  22. 1020 if vx+vy < acc then goto 1010
  23. 1030 vx = 0 : vy = 0 : v = v + 0.02 : return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement