Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Chaos-game/Mathematica/chaos-game.math
Normal file
10
Task/Chaos-game/Mathematica/chaos-game.math
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
points = 5000;
|
||||
a = {0, 0};
|
||||
b = {1, 0};
|
||||
c = {0.5, 1};
|
||||
d = {.7, .3};
|
||||
S = {};
|
||||
For[i = 1, i < points, i++, t = RandomInteger[2];
|
||||
If[t == 0, d = Mean[{a, d}],
|
||||
If[t == 1, d = Mean[{b, d}], d = Mean[{c, d}]]]; AppendTo[S, d]]
|
||||
Graphics[Point[S]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue