-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandomwalk.html
104 lines (85 loc) · 4.68 KB
/
randomwalk.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE HTML>
<!--
Massively by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Random Walk</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.5.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.5.0/addons/p5.sound.min.js"></script>
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<!-- Header -->
<header id="header">
<a href="index.html" class="logo">Back</a>
</header>
<!-- Nav -->
<nav id="nav">
<ul class="links">
<li><a href="index.html">Menu</a></li>
<li><a href="tree.html">Fractal Tree</a></li>
<li class="active"><a href="generic.html">Random Walk</a></li>
<li><a href="gasdiffusion.html">Gas Diffusion</a></li>
<li><a href="dla.html">Diffusion-limited aggregation</a></li>
</ul>
<ul class="icons">
<li><a href="https://github.com/poetntowncrier/PhysicsSimulation" class="icon brands fa-github"><span class="label">GitHub</span></a></li>
</ul>
</nav>
<!-- Main -->
<div id="main">
<!-- Post -->
<section class="post">
<header class="major">
<h1>
Random Walk</h1>
<p>A random walk is a random process that describes a path that consists of a succession of random steps.<br />Every random walk corresponds to a diffusion law.</p>
</header>
<div class="image fit"><img style="display: block;
margin-left: 4rem;
margin-right: 4rem;
width: 80%;" src="images/pic03.jpg" alt="" />
</div>
<p style="text-align: center; font-size: 5pt">Random Walk<br />Image from
<a href="https://www.wikiwand.com/simple/Random_walk">https://www.wikiwand.com/simple/Random_walk</a></p>
</p>
<p> <br />
First proposed in 1905 by Karl Pearson, a random walk is a mathematical statistical model consisting of a sequence of trajectories, each of which is random.
Random walks have many applications in various fields, including ecology, psychology, computer science, physics, chemistry, biology, and economics. In mathematics, we can use random walks to estimate the value of π.
Additionally, they can be used to simulate the paths of molecules as they travel through liquids or gases, the search paths of foraging animals, and fluctuating stock prices.
</p>
<button type="button" id="startwalk" onclick="myp5.start()">Begin</button>
<button type="button" id="resetwalk" onclick="myp5.resetwalk()">Reset</button>
<div class="p5" id="rwalk">
<p>
1. Press 'p' to stop the random walk; Press 's' to resume the random walk.<br />
2. The walk starts from the centre point. The probability of walking towards four directions is the same. Click to start at a new point.<br />
3. If the particle has already walked on a certain point, the point will turn red.<br />
4. Click 'Begin' to start; Click 'Reset' to reset the simulation.
</p>
</div>
</section>
</div>
<!-- Copyright -->
<div id="copyright">
<ul><li>Powered by Mingyi Shao, Template from HTML5 UP, Library from p5.js & MathJax</li></ul>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/random.js"></script>
</body>
</html>