Advertisement
Matthen

Hopalong Fractal

Jun 6th, 2013
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. a = -12;
  2. b = +0.3;
  3. c = -0.56;
  4. f[{x_, y_}] := {y - Sign[x]*Sqrt[Abs[b*x - c]], a - x};
  5. pts = NestList[f, {0, 0}, 100000];
  6. Graphics[{
  7. PointSize[Small], Opacity[0.3],
  8. Table[{
  9. ColorData["DarkRainbow"][i/101],
  10. Point[
  11. pts[[Floor[i * Length[pts]/101] ;;
  12. Floor[(i + 1) * Length[pts]/101]]]]
  13. },
  14. {i, 100}]
  15. }]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement