-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo1.htm
48 lines (45 loc) · 1.28 KB
/
demo1.htm
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
<!DOCTYPE html>
<html lang='en' xml:lang='en' xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>MC Demo 1</title>
<script type="text/javascript" src="js/Candy.js"></script>
<script type="text/javascript" src="js/Curve.js"></script>
<script type="text/javascript" src="js/main1.js"></script>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div id="wrapper">
<article>
<header>
<h1>Monte Carlo Methods - Demo 1</h1>
</header>
<section>
<h2>Estimating the value of π</h2>
<div class="leftFloat">
<span>The square (400x400 pixels) is considered to be a unit square</span>
<div id="candiv">
<canvas id="canv" width="400" height="400"></canvas>
</div>
</div>
<div>
<br><br><br>
<div>
<button type="button" id="est">Start</button>
<button type="button" id="stop">Stop</button>
<div id="data">
Total Number of Random Points: <span id="noN"></span> <br>
Number of points inside the curve: <span id="nop"></span> <br>
π ≈ <span id="pi"></span> <br>
</div>
</div>
</div>
</section>
<footer>
Copyright © 2016, K Sannidhya Shukla <br>
ALL RIGHTS RESERVED
</footer>
</article>
</div>
</body>
</html>