Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Clear[landscape];
- landscape[n_] := landscape[n] = Module[{pts},
- pts = GaussianFilter[
- Accumulate@
- Table[RandomReal[NormalDistribution[0, 1], n], {i, n}],
- Floor[n/4]] +
- Transpose@
- GaussianFilter[
- Accumulate@
- Table[RandomReal[NormalDistribution[0, 1], n], {i, n}],
- Floor[n/4]];
- pts = Flatten[
- Table[{(i - 1)/(n - 1), (j - 1)/(n - 1), pts[[i, j]]}, {i,
- n}, {j, n}], 1];
- Interpolation[pts]
- ];
- Manipulate[
- ContourPlot[
- Sum[(\[Alpha])^-n landscape[2^n][x, y], {n, 2, 11}], {x, 0.2,
- 0.8}, {y, 0.2, 0.8}, Axes -> None, PlotRange -> All,
- Contours -> Table[i, {i, -3, 3, 0.1}],
- ColorFunction -> "GreenBrownTerrain", Frame -> None]
- , {\[Alpha], 1.2, 2}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement