Advertisement
linesguy

Fractal spirograph

Mar 29th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. 10 hgr2 : hcolor = 3
  2. 20 R(1) = 50
  3. 30 R(2) = 50/3
  4. 40 R(3) = 50/3/3
  5. 50 R(4) = 50/3/3/3
  6. 60 X(1) = 140 : Y(1) = 96
  7. 70 S(1) = 0.01
  8. 80 S(2) = 0.01*4
  9. 90 S(3) = 0.01*4*4
  10. 100S(4) = 0.01*4*4*4
  11. 110 P(1) = 0 : p(2) = 0 : p(3) = 0 : p(4) = 0
  12.  
  13. 200 P(1) = P(1) + S(1)
  14. 210 X(2) = sin(P(1))*r(1)+x(1) : y(2) = cos(p(1))*r(1)+y(1)
  15.  
  16. 220 P(2) = P(2) - S(2)
  17. 230 X(3) = sin(P(2))*r(2)+X(2) : Y(3) = cos(p(2))*r(2)+y(2)
  18.  
  19. 240 P(3) = P(3) + s(3)
  20. 250 X(4) = sin(P(3))*r(3)+x(3) : Y(4) = cos(P(3))*r(3)+y(3)
  21.  
  22. 260 P(4) = P(4) - s(4)
  23. 270 hplot sin(P(4))*r(4)+x(4),cos(p(4))*r(4)+y(4)
  24.  
  25. 280 goto 200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement